Class: CategorySweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Defined in:
app/controllers/category_sweeper.rb

Instance Method Summary collapse

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