Home


Servlet caching


Servlet caching is equivalent to full-page caching and provides the same benefits. When you configure a page to be full-page (or servlet) cached, its entry in the cache contains the servlet along with the content from its JSP fragments. Think of this as taking the complete request to the servlet and making one cached object.

How: Take the sample cachespec.xml from the samples directory in WebSphere Commerce that is under the ConsumerDirect directory. This sample will show you how to cache the browsing pages in the sample B2C WebSphere Commerce site.

Change the PATHINFO to match your store if you have used custom names.

See DynaCache full page caching for more detailed information on servlet caching and the consume-subfragments property.

Why: We use servlet caching whenever possible because it gives the greatest performance benefit. Caching at the servlet level allows you to maximize what is contained in a given cache entry, thereby minimizing the time required to return the cached information on its subsequent requests. Servlet caching entirely removes the execution of Java code and database lookups on a cache-hit. It also removes execution of most of the runtime code in WebSphere Commerce.

+

Search Tips   |   Advanced Search