Sha256: 3efdb20469e2abf78ba41e9a9a86f2903762648ec67bcb71eaa69d0fcab70c10
Contents?: true
Size: 422 Bytes
Versions: 13
Compression:
Stored size: 422 Bytes
Contents
class CmsContentSweeper < ActionController::Caching::Sweeper observe CmsPage, CmsTemplate, CmsSnippet def after_save(record) delete_all_cached_pages end def after_destroy(record) delete_all_cached_pages end def delete_all_cached_pages CmsPage.find_each do |page| expire_page :controller => 'cms/content', :action => 'show', :content_path => page.path.split('/') end end end
Version data entries
13 entries across 13 versions & 1 rubygems