Skip to content

Commit 95f9af8

Browse files
committed
Use cache_key_with_version instead of cache_key for the example in Low-Level Caching [ci skip]
1 parent 82fc7cd commit 95f9af8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/caching_with_rails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Consider the following example. An application has a `Product` model with an ins
295295
```ruby
296296
class Product < ApplicationRecord
297297
def competing_price
298-
Rails.cache.fetch("#{cache_key}/competing_price", expires_in: 12.hours) do
298+
Rails.cache.fetch("#{cache_key_with_version}/competing_price", expires_in: 12.hours) do
299299
Competitor::API.find_price(id)
300300
end
301301
end

0 commit comments

Comments
 (0)