未验证 提交 2686cf02 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #36568 from rodrei/update-cache-docs

Port caching documentation fix to stable-5.2
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册