Class: EventSweeper

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

Instance Method Summary collapse

Instance Method Details

#after_create(event) ⇒ Object

If our sweeper detects that an Event was created call this


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

def after_create(event)
  expire_cache_for(event)
end

#after_destroy(event) ⇒ Object

If our sweeper detects that an Event was deleted call this


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

def after_destroy(event)
  expire_cache_for(event)
end

#after_update(event) ⇒ Object

If our sweeper detects that an Event was updated call this


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

def after_update(event)
  expire_cache_for(event)
end