Class: StructureSweeper
- Inherits:
-
ActionController::Caching::Sweeper
- Object
- ActionController::Caching::Sweeper
- StructureSweeper
- Defined in:
- lib/generators/freeberry/base/templates/sweepers/structure_sweeper.rb
Class Method Summary collapse
-
.sweep! ⇒ Object
Clear all orders cache files.
Instance Method Summary collapse
Class Method Details
.sweep! ⇒ Object
Clear all orders cache files
17 18 19 20 21 22 |
# File 'lib/generators/freeberry/base/templates/sweepers/structure_sweeper.rb', line 17 def self.sweep! cache_store = Rails.application.config.action_controller.cache_store cache_store.clear if cache_store Rails.logger.info("StructureSweeper clear all cache") end |
Instance Method Details
#after_create(item) ⇒ Object
4 5 6 |
# File 'lib/generators/freeberry/base/templates/sweepers/structure_sweeper.rb', line 4 def after_create(item) expire(item) end |
#after_destroy(item) ⇒ Object
12 13 14 |
# File 'lib/generators/freeberry/base/templates/sweepers/structure_sweeper.rb', line 12 def after_destroy(item) expire(item) end |
#after_update(item) ⇒ Object
8 9 10 |
# File 'lib/generators/freeberry/base/templates/sweepers/structure_sweeper.rb', line 8 def after_update(item) expire(item) end |