discourse/app/models/anon_site_json_cache_observer.rb

13 lines
243 B
Ruby
Raw Normal View History

2016-04-01 05:33:25 +08:00
class AnonSiteJsonCacheObserver < ActiveRecord::Observer
observe :category, :post_action_type, :user_field, :group
def after_destroy(object)
Site.clear_anon_cache!
end
def after_save(object)
Site.clear_anon_cache!
end
end