mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FIX: Only cache reports with exceptions for 1 minute (#11447)
This commit is contained in:

committed by
GitHub

parent
06077856ce
commit
521934f163
@ -223,7 +223,8 @@ class Report
|
||||
Discourse.cache.read(cache_key(report))
|
||||
end
|
||||
|
||||
def self.cache(report, duration)
|
||||
def self.cache(report)
|
||||
duration = report.error == :exception ? 1.minute : 35.minutes
|
||||
Discourse.cache.write(cache_key(report), report.as_json, expires_in: duration)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user