开发者

Does Rails 3 provide time based caching?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜