OpenSymphony OSCache - JSP Cache

OSCache is a caching solution that includes a JSP tag library and set of classes to perform fine grained dynamic caching of JSP content, servlet responses or arbitrary objects. It provides both in memory and persistent on disk caches, and can allow your site to have graceful error tolerance (eg if an error occurs like your db goes down, you can serve the cached content so people can still surf the site almost without knowing). Take a look at the great features of OSCache.
Sample Code:
Example web.xml Configuration
<filter>
    <filter-name>CacheFilter</filter-name>
    <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
    <init-param>
        <param-name>time</param-name>
        <param-value>600</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>CacheFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>
Example JSP usage
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>

<cache:cache key="test-key" time="3600">

Date date = new Date((new Date()).getTime());

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

Date = <%=queryFormat.format(date) %>

</cache:cache>