[Opensymphony-oscache] Cache clearing problem - refresh=true

Edward <[email protected]> Tue, 17 May 2005 05:29:14 CDT
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <435370.1116325840061.JavaMail.os-j2ee@opensymphony01.contegix.com>
I'm having a problem clearing the cache for a jsp page. 

The essential bits of the jsp page are:

<%
boolean refresh = request.getParameter("refresh")==null?false:true;
%>
stuff not to be cached
<cache:cache time="86400" scope="application" refresh="<%=refresh%>">
stuff to be cached
</cache:cache>




I have a separate jsp that displays simply a 'Clear cache' button. This submits a hidden form element named refresh, with a value of true to the jsp shown above.

<form action="the_jsp_page.jsp" method="post">
<input type="hidden" name="refresh" value="true">
<input type="submit" value="Clear cache">
</form>

If I click the button, the cache is cleared and I view the_jsp_page.jsp as though for the 1st time. Unfortunately, if I access the_jsp_page.jsp directly through a link or URL, the cleared cache returns????? Can anyone explain why this happens and how I fix it?

Thanks in advance,

Edward


oscache.properties------
cache.path=C:\\Tomcat 4.1.30\\reporting_cache
cache.debug=false
cache.algorithm=com.opensymphony.module.oscache.base.algorithm.FIFOCache
cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
cache.capacity=1000
cache.unlimited_disk=true

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=2284&messageID=6694#6694