Alexey Zakharov
Alexey Zakharov

Reputation: 25102

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://edgeguides.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

Upvotes: 1

Views: 480

Answers (1)

Christoph Lupprich
Christoph Lupprich

Reputation: 1190

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:

Upvotes: 3

Related Questions