Clear report cache when report is closed
This commit is contained in:
parent
09009c352b
commit
36f47b7067
|
@ -99,7 +99,7 @@ public class ReportManager
|
||||||
|
|
||||||
report.setHandlerId(closerId);
|
report.setHandlerId(closerId);
|
||||||
report.setReportResult(reportResult);
|
report.setReportResult(reportResult);
|
||||||
_reportRepository.updateReport(report);
|
_reportRepository.updateReport(report).thenAccept(voiD -> _reportRepository.clearCache(reportId));
|
||||||
|
|
||||||
if (reportCloser != null)
|
if (reportCloser != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -438,6 +438,11 @@ public class ReportRepository extends MinecraftRepository
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void clearCache(int reportId)
|
||||||
|
{
|
||||||
|
_cachedReports.invalidate(reportId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if either the suspect or handler (if any) are online.
|
* Checks if either the suspect or handler (if any) are online.
|
||||||
* If either are online then this will return true, otherwise false.
|
* If either are online then this will return true, otherwise false.
|
||||||
|
|
Loading…
Reference in New Issue