Commit b2a48f3e authored by Guus der Kinderen's avatar Guus der Kinderen Committed by daryl herzmann

OF-1365: Don't allow caches that do not expire to be purged. (#839)

parent 90962bc3
...@@ -198,6 +198,8 @@ ...@@ -198,6 +198,8 @@
hitPercent = percentFormat.format(hitValue) + "%"; hitPercent = percentFormat.format(hitValue) + "%";
lowEffec = (hits > 500 && hitValue < 85.0 && freeMem < 20.0); lowEffec = (hits > 500 && hitValue < 85.0 && freeMem < 20.0);
} }
// OF-1365: Don't allow caches that do not expire to be purged. Many of these caches store data that cannot be recovered again.
final boolean canPurge = cache.getMaxLifetime() > -1;
%> %>
<tr class="<%= (lowEffec ? "jive-error" : "") %>"> <tr class="<%= (lowEffec ? "jive-error" : "") %>">
<td class="c1"> <td class="c1">
...@@ -229,7 +231,11 @@ ...@@ -229,7 +231,11 @@
<%= hitPercent%> <%= hitPercent%>
</td> </td>
<td width="1%" class="c5"><input type="checkbox" name="cacheID" value="<%= i %>" onclick="updateControls(this.form);toggleHighlight(this);"></td> <td width="1%" class="c5">
<% if ( canPurge ) {%>
<input type="checkbox" name="cacheID" value="<%= i %>" onclick="updateControls(this.form);toggleHighlight(this);">
<% } %>
</td>
</tr> </tr>
<% } %> <% } %>
......
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