Skip to content

Commit

Permalink
Use cache_key_with_version instead of cache_key for the example in Lo…
Browse files Browse the repository at this point in the history
…w-Level Caching [ci skip]
  • Loading branch information
tnantoka committed Nov 26, 2018
1 parent 82fc7cd commit 95f9af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/caching_with_rails.md
Expand Up @@ -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
Expand Down

0 comments on commit 95f9af8

Please sign in to comment.