Class: NavigationSweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Defined in:
app/sweepers/navigation_sweeper.rb

Instance Method Summary collapse

Instance Method Details

#sweep(menu) ⇒ Object Also known as: after_save, after_touch

Clear all cache when updating the menu. Menu is present on all pages. It also changes for each page because of the ‘active’ link.



6
7
8
# File 'app/sweepers/navigation_sweeper.rb', line 6

def sweep(menu)
  Rails.cache.clear
end