diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-03 09:55:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-03 09:55:14 +0900 |
commit | 2b8aee8ce54cc977bf80d57454cde642b211bef5 (patch) | |
tree | 173a5e1a3f5110032a5d11acd55130a69beeddb3 /guides/source | |
parent | b2209ca59dc8cc0a1157c93ca956d1959b79c465 (diff) | |
parent | e27a511b66d0741625cf125ecdbf021dff0e193a (diff) | |
download | rails-2b8aee8ce54cc977bf80d57454cde642b211bef5.tar.gz rails-2b8aee8ce54cc977bf80d57454cde642b211bef5.tar.bz2 rails-2b8aee8ce54cc977bf80d57454cde642b211bef5.zip |
Merge pull request #35833 from soartec-lab/update_guide_caching
Fixed description of the `cache_key_with_version` method [skip ci]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/caching_with_rails.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index f6612ba338..3f013fff3a 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -302,7 +302,7 @@ class Product < ApplicationRecord end ``` -NOTE: Notice that in this example we used the `cache_key_with_version` method, so the resulting cache key will be something like `products/233-20140225082222765838000/competing_price`. `cache_key_with_version` generates a string based on the model's `id` and `updated_at` attributes. This is a common convention and has the benefit of invalidating the cache whenever the product is updated. In general, when you use low-level caching for instance level information, you need to generate a cache key. +NOTE: Notice that in this example we used the `cache_key_with_version` method, so the resulting cache key will be something like `products/233-20140225082222765838000/competing_price`. `cache_key_with_version` generates a string based on the model's class name, `id`, and `updated_at` attributes. This is a common convention and has the benefit of invalidating the cache whenever the product is updated. In general, when you use low-level caching for instance level information, you need to generate a cache key. ### SQL Caching |