Pages

Monday, June 20, 2011

Dynacache cache policy for caching all static content in an Application

Copy this into a cachespec.xml file and put this in the WEB-INF directory of your application. Please enable servlet caching on the WebContainer.
<?xml version="1.0" ?>
<!DOCTYPE cache SYSTEM "cachespec.dtd">
<cache>
       <!-- Cache Entry for the File Serving Servlet
        Will cache all static content in the web application -->
 <cache-entry>
  <class>static</class>
  <name>com.ibm.ws.webcontainer.servlet.SimpleFileServlet.class</name>
  <cache-id>
   <component id="" type="pathinfo">
    <required>true</required>
   </component> 
   <timeout>300</timeout>
  </cache-id>
 </cache-entry>
</cache>

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.