Commit 082d10b5 authored by Guus der Kinderen's avatar Guus der Kinderen Committed by akrherz

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

parent 5f27472a
...@@ -201,6 +201,8 @@ ...@@ -201,6 +201,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">
...@@ -232,7 +234,11 @@ ...@@ -232,7 +234,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