views:

255

answers:

2

I need to cache a single page. I've used ActionController's caches_page for this. But now, I'd like to expire AND regenerate it once in every 10 minutes. What are my options?

later: I'd like to not use any external tools for this, like cron. The important point is interval-based expiry of the cache.

+1  A: 

AFAIK rails page caching compares the cache time on request and regenerates if necessary. If you need to forcibly flush that cache check out Sweepers. http://www.railsenvy.com/2007/2/28/rails-caching-tutorial#sweepers

Dave Cheney
+1  A: 

You can also use this if you want to have fragments timeout.

unexist