Administer caching in WebSphere Commerce
An administrator using caching in WebSphere Commerce should be familiar with full page and fragment caching, Edge Side include, and using the dynamic API not to cache.
In the development environment servlet caching is disabled.
To enable and use servlet caching, see Configuring servlet cachingtopics in the WebSphere Application Server Information Center.
- Full page and fragment caching
The method by which the WebSphere Application Server caches JSP files is based on how the JSP is written. If the page output for a particular WebSphere Commerce command always produces the same result based on the URL parameters and request attributes, then this page output can be cached with the cache-entry using the property element, consume-subfragments (CSF) along with the WebSphere Commerce controller servlet (com.ibm.commerce.struts.ECActionServlet.class) as the servlet name. When the cache-entry is defined in this manner, then the page output is cached in a manner known as full page caching. The big advantage of using consume-subfragments with the controller servlet is performance, but if there is personalized information on the page, such as a mini shopping cart, then full page caching with fragments can be used.
- Edge caching
Caching on the edge is a simple and effective way to improve the performance of the system. The WebSphere Application Server's dynacache has built-in functionality so that setting the EdgeCacheable property of a cache entry to true will allow it to be cached on the edge. This property takes care of the ESI for you, making edge caching easy with virtually no setup overhead.
- Use dynamic API to not cache
Occasionally, it is not appropriate to cache a page that matches a caching rule, or a fragment within the cached page. In this case, the Dynacache API makes it possible to ignore the cache rule and not cache the page or fragment in question.