Disable caching of site settings temporarily
This commit is contained in:
parent
0eaf32db45
commit
3df42f5c45
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue