Sha256: c757bb648a6f6bff681b643711cc08bb1615477c5dcc38fd535cf82abf96494f

Contents?: true

Size: 337 Bytes

Versions: 3

Compression:

Stored size: 337 Bytes

Contents

class PageSweeper < ActionController::Caching::Sweeper
  observe Page
  def after_create(page)
    expire_cache_for(page)
  end

  def after_update(page)
    expire_cache_for(page)
  end

  def after_destroy(page)
    expire_cache_for(page)
  end
  
  private
  
  def expire_cache_for(page)
    expire_fragment('footer_menu')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
synergy_default_theme-1.0.2 app/models/page_sweeper.rb
synergy_default_theme-1.0.1 app/models/page_sweeper.rb
synergy_default_theme-1.0.0 app/models/page_sweeper.rb