Class: NavigationSweeper
- Inherits:
-
ActionController::Caching::Sweeper
- Object
- ActionController::Caching::Sweeper
- NavigationSweeper
- Defined in:
- app/sweepers/navigation_sweeper.rb
Instance Method Summary collapse
-
#sweep(menu) ⇒ Object
(also: #after_save, #after_touch)
Clear all cache when updating the menu.
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() Rails.cache.clear end |