mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 06:43:53 +08:00
c531f4ded5
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.
14 lines
199 B
Ruby
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
|