Class: PageSweeper

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

Instance Method Summary collapse

Instance Method Details

#after_create(page) ⇒ Object

If our sweeper detects that a Page was created call this



5
6
7
# File 'app/controllers/page_sweeper.rb', line 5

def after_create(page)
  expire_cache_for(page)
end

#after_destroy(page) ⇒ Object

If our sweeper detects that a Page was deleted call this



15
16
17
# File 'app/controllers/page_sweeper.rb', line 15

def after_destroy(page)
  expire_cache_for(page)
end

#after_update(page) ⇒ Object

If our sweeper detects that a Page was updated call this



10
11
12
# File 'app/controllers/page_sweeper.rb', line 10

def after_update(page)
  expire_cache_for(page)
end