FIX: Only cache reports with exceptions for 1 minute (#11447)

This commit is contained in:
Mark VanLandingham
2020-12-09 10:54:41 -06:00
committed by GitHub
parent 06077856ce
commit 521934f163
4 changed files with 32 additions and 4 deletions

View File

@ -42,7 +42,7 @@ class Admin::ReportsController < Admin::AdminController
report = Report.find(report_type, args)
if (report_params[:cache]) && report
Report.cache(report, 35.minutes)
Report.cache(report)
end
if report.blank?
@ -80,7 +80,7 @@ class Admin::ReportsController < Admin::AdminController
raise Discourse::NotFound if report.blank?
if (params[:cache])
Report.cache(report, 35.minutes)
Report.cache(report)
end
render_json_dump(report: report)