Commit bf32b562 authored by Greg Thomas's avatar Greg Thomas

OF-1409: Ensure that clearing the cache is audited.

Also remove unnecessary variable assignment
parent aa8ad82b
......@@ -100,7 +100,6 @@
<% // Get parameters
boolean doClearCache = request.getParameter("clear") != null;
int refresh = ParamUtils.getIntParameter(request, "refresh", -1);
int[] cacheIDs = ParamUtils.getIntParameters(request, "cacheID", -1);
// Get the list of existing caches
......@@ -120,7 +119,9 @@
// Clear one or multiple caches if requested.
if (doClearCache) {
for (int cacheID : cacheIDs) {
caches[cacheID].clear();
final Cache cache = caches[cacheID];
cache.clear();
webManager.logEvent(String.format("Cleared cache '%s'", cache.getName()), null);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment