railtie.rb 284 B

123456789
  1. module RailsSettings
  2. class Railtie < Rails::Railtie
  3. initializer 'rails_settings.active_record.initialization' do
  4. RailsSettings::Base.after_commit :rewrite_cache, on: %i(create update)
  5. RailsSettings::Base.after_commit :expire_cache, on: %i(destroy)
  6. end
  7. end
  8. end