Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Attributes
- Next: flush

#### Example

The following example represents a cached JSP file:

    <%@ taglib prefix="mypfx" uri="Sun ONE Application Server Tags" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <mypfx:cache                 key="${sessionScope.loginId}"
    			nocache="${param.nocache}"
    			refresh="${param.refresh}"
    			timeout="10m">
    <c:choose>
    	<c:when test="${param.page == 'frontPage'}">
    		<%-- get headlines from database --%>
    	</c:when>
    	<c:otherwise>
    		...
    	</c:otherwise>
    </c:choose>
    </mypfx:cache>
    <mypfx:cache timeout="1h">
    <h2> Local News </h2>
    	<%-- get the headline news and cache them --%>
    </mypfx:cache>

- Previous: Attributes
- Next: flush

- © 2010, Oracle Corporation and/or its affiliates