mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
PERF: Defer setting of distributed cache in category.
See follow up commit for rational. Follow-up to 8cfe203
This commit is contained in:
parent
9625208f40
commit
982eaab9b0
@ -735,7 +735,9 @@ class Category < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def url
|
||||
@@url_cache[self.id] ||= "#{Discourse.base_path}/c/#{slug_path.join('/')}/#{self.id}"
|
||||
@@url_cache.defer_get_set(self.id) do
|
||||
"#{Discourse.base_path}/c/#{slug_path.join('/')}/#{self.id}"
|
||||
end
|
||||
end
|
||||
|
||||
def url_with_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user