Sha256: 0035acdb04988fae0e52a3fbe4c7c122c5c8385405149460a8f121ba2d55870f

Contents?: true

Size: 293 Bytes

Versions: 4

Compression:

Stored size: 293 Bytes

Contents

class SurveySectionSweeper < ActionController::Caching::Sweeper
  observer SurveySection

  def after_save(section)
    expire_cache(section)
  end

  def after_destroy(section)
    expire_cache(section)
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
surveyor-0.14.3 app/models/survey_section_sweeper.rb
surveyor-0.14.2 app/models/survey_section_sweeper.rb
surveyor-0.14.1 app/models/survey_section_sweeper.rb
surveyor-0.14.0 app/models/survey_section_sweeper.rb