Sha256: 59a278e7b118aeaf65733a8acf1bfdce62eb80615914e19efff9c931a16a970b

Contents?: true

Size: 345 Bytes

Versions: 9

Compression:

Stored size: 345 Bytes

Contents

class NavigationSweeper < ActionController::Caching::Sweeper
  observe Georgia::Menu

  # Clear all cache when updating the menu.
  # Menu is present on all pages. It also changes for each page because of the 'active' link.
  def sweep(menu)
    Rails.cache.clear
  end
  alias_method :after_save, :sweep
  alias_method :after_touch, :sweep

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
georgia-0.7.8 app/sweepers/navigation_sweeper.rb
georgia-0.7.7 app/sweepers/navigation_sweeper.rb
georgia-0.7.6 app/sweepers/navigation_sweeper.rb
georgia-0.7.5 app/sweepers/navigation_sweeper.rb
georgia-0.7.4 app/sweepers/navigation_sweeper.rb
georgia-0.7.3 app/sweepers/navigation_sweeper.rb
georgia-0.7.2 app/sweepers/navigation_sweeper.rb
georgia-0.7.1 app/sweepers/navigation_sweeper.rb
georgia-0.7.0 app/sweepers/navigation_sweeper.rb