discourse/app/models/concerns/anon_cache_invalidator.rb
Sam c531f4ded5 remove rails-observers
Rails yanked out observers many many years ago, instead the functionality
was yanked out to a gem that is very lightly maintained.

For example: if we want to upgrade to rails 5 there is no published gem

Internally the usage of observers had quite a few problem.

The series of refactors renamed a bunch of classes to give us more clarity
and removed some magic.
2016-12-22 16:46:53 +11:00

14 lines
199 B
Ruby

module AnonCacheInvalidator
extend ActiveSupport::Concern
included do
after_destroy do
Site.clear_anon_cache!
end
after_save do
Site.clear_anon_cache!
end
end
end