mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: increase caching of category descriptions
This commit is contained in:
parent
3b4e52cb36
commit
aefedfafea
@ -199,7 +199,7 @@ SQL
|
|||||||
def description_text
|
def description_text
|
||||||
return nil unless description
|
return nil unless description
|
||||||
|
|
||||||
@@cache ||= LruRedux::ThreadSafeCache.new(100)
|
@@cache ||= LruRedux::ThreadSafeCache.new(1000)
|
||||||
@@cache.getset(self.description) do
|
@@cache.getset(self.description) do
|
||||||
Nokogiri::HTML(self.description).text
|
Nokogiri::HTML(self.description).text
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user