开发者

Does Rails 3 provide time based caching?

开发者 https://www.devze.com 2023-01-12 23:29 出处:网络
I need a timebased caching of certain pages. Cache for certain page should be cleared each 15 minutes. Is that possible?

I need a timebased caching of certain pages. Cache for certain page should be cleared each 15 minutes. Is that possible?

In http://edgeguid开发者_如何学Pythones.rubyonrails.org/caching_with_rails.html manual I see that there is only manual cache clear methods, such as expire_page or expire_action.

Regards, Alexey


It's possible out-of-the-box if you're using memcached for caching by specifying :expires_in. And here is a Rails ticket, which enables caching also with the default file store:

0

精彩评论

暂无评论...
验证码 换一张
取 消