I code this on my controller: caches_page :index cache_sweeper :site_sweeper https://github.com/leandromoreira/playground.activ... and this on my sweeper class SiteSweeper < ActionController::Caching::Sweeper observe Article, Category def after_create(model) expire_cache_for(model) end def after_update(model) expire_cache_for(model) end def after_destroy(model) expire_cache_for(model) end private def expire_cache_for(model) expire_page controller: 'page', action: 'index' end end https://github.com/leandromoreira/playground.activ... But I change my Article and the change do not expire the page, am I doing something wrong?
on 2012-10-31 23:15
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.