Class: SurveySectionSweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Defined in:
app/models/survey_section_sweeper.rb

Instance Method Summary collapse

Instance Method Details

#after_destroy(section) ⇒ Object



8
9
10
# File 'app/models/survey_section_sweeper.rb', line 8

def after_destroy(section)
  expire_cache(section)
end

#after_save(section) ⇒ Object



4
5
6
# File 'app/models/survey_section_sweeper.rb', line 4

def after_save(section)
  expire_cache(section)
end

#expire_cache(section) ⇒ Object



12
13
14
# File 'app/models/survey_section_sweeper.rb', line 12

def expire_cache(section)
  expire_fregment "section_#{section.id}"
end