Sun Java System Web Server 6.1 SP6 Programmer's Guide to Web Applications

flush

Forces the cache to be flushed. If a key is specified, only the entry with that key is flushed. If no key is specified, the entire cache is flushed.

Attributes

The following table describes attributes for the flush tag. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.

Table 3–5 flush Attributes

Attribute  

Default  

Description  

key

ServletPath_Suffix

(optional) The name used by the container to access the cached entry. The cache key is suffixed to the servlet path to generate a key to access the cached entry. If no key is specified, a number is generated according to the position of the tag in the page. 

Examples

To flush the entry with key="foobar":


<mypfx:flush key="foobar">

         

To flush the entire cache:


<% if (session != null && session.getAttribute("clearCache") != null) { %>
     <mypfx:flush >
 <% } %>