Disable caching of site settings temporarily

This commit is contained in:
Robin Ward 2013-10-17 15:49:06 -04:00
parent 0eaf32db45
commit 3df42f5c45
1 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ class Site
end end
def cache_key def cache_key
k ="site_json_cats_" k = "site_json_cats_"
k << @guardian.secure_category_ids.join("_") if @guardian k << @guardian.secure_category_ids.join("_") if @guardian
end end
@ -64,9 +64,9 @@ class Site
# On my local this was not being flushed as post actions types changed, it turn this # On my local this was not being flushed as post actions types changed, it turn this
# broke local. # broke local.
site = Site.new(guardian) site = Site.new(guardian)
Discourse.cache.fetch(site.cache_key, family: "site", expires_in: 1.minute) do #Discourse.cache.fetch(site.cache_key, family: "site", expires_in: 1.minute) do
MultiJson.dump(SiteSerializer.new(site, root: false)) MultiJson.dump(SiteSerializer.new(site, root: false))
end #end
end end
def self.invalidate_cache def self.invalidate_cache