aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authortnantoka <tnantoka@bornneet.com>2018-11-26 13:21:24 +0900
committertnantoka <tnantoka@bornneet.com>2018-11-26 13:21:24 +0900
commit95f9af8257d85764cc2938f0b81bdd39f60de468 (patch)
treedac5554baaf1dd40b2bd6d2f99595bda3e514350 /guides
parent82fc7cdef59ea4714a11ef5ae12c2f776f73e154 (diff)
downloadrails-95f9af8257d85764cc2938f0b81bdd39f60de468.tar.gz
rails-95f9af8257d85764cc2938f0b81bdd39f60de468.tar.bz2
rails-95f9af8257d85764cc2938f0b81bdd39f60de468.zip
Use cache_key_with_version instead of cache_key for the example in Low-Level Caching [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/caching_with_rails.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 67b097f2ae..3ac3f8fa8b 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -295,7 +295,7 @@ Consider the following example. An application has a `Product` model with an ins
```ruby
class Product < ApplicationRecord
def competing_price
- Rails.cache.fetch("#{cache_key}/competing_price", expires_in: 12.hours) do
+ Rails.cache.fetch("#{cache_key_with_version}/competing_price", expires_in: 12.hours) do
Competitor::API.find_price(id)
end
end