Class: CategorySweeper
- Inherits:
-
ActionController::Caching::Sweeper
- Object
- ActionController::Caching::Sweeper
- CategorySweeper
- Defined in:
- app/controllers/category_sweeper.rb
Instance Method Summary collapse
-
#after_create(category) ⇒ Object
If our sweeper detects that a Category was created call this.
-
#after_destroy(category) ⇒ Object
If our sweeper detects that a Category was deleted call this.
-
#after_update(category) ⇒ Object
If our sweeper detects that a Category was updated call this.
Instance Method Details
#after_create(category) ⇒ Object
If our sweeper detects that a Category was created call this
5 6 7 |
# File 'app/controllers/category_sweeper.rb', line 5 def after_create(category) expire_cache_for(category) end |
#after_destroy(category) ⇒ Object
If our sweeper detects that a Category was deleted call this
15 16 17 |
# File 'app/controllers/category_sweeper.rb', line 15 def after_destroy(category) expire_cache_for(category) end |
#after_update(category) ⇒ Object
If our sweeper detects that a Category was updated call this
10 11 12 |
# File 'app/controllers/category_sweeper.rb', line 10 def after_update(category) expire_cache_for(category) end |