caching

uses fragment caching in the storefront.

Notes:
  • Search results from the search results page are not cached unless a category ID is associated with them. That is, search results with facets or search terms are not cached.

For a fragment to be cacheable, it must be self-executable. Each dynamically included JSP file must contain its own <cache-entry> defined in the cachespec.xml file. This <cache-entry> is required to have the JSP file served up by the dynamic cache when it receives a request. Otherwise, each dynamically included JSP file is re-executed for each request. For example, if StoreCatalogDisplay.jsp dynamically includes CachedHeaderDisplay.jsp, CachedFooterDisplay.jsp and CachedStoreCatalogDisplay.jsp and you only set up a <cache-entry> for the CachedStoreCatalogDisplay.jsp. Then, when you request the StoreCatalogDisplay page, the CachedStoreCatalogDisplay.jsp, CachedHeaderDisplay.jsp, and CachedFooterDisplay.jsp files are executed if they are not cached.

Cache invalidation

When the search index is updated, the search related cache entries must be invalidated using the Dynacache API.

dynamic caching provides the following APIs to support programmatic invalidation:
  • com.ibm.websphere.cache.invalidateById
  • com.ibm.websphere.cache.invalidateByTemplate
  • com.ibm.websphere.cache.clear

also provides a DynaCacheInvalidation command, which is called by the scheduler periodically to process the records in the CACHEIVL table. It then calls the WebSphere Application Server dynamic cache invalidation APIs to invalidate the specified cache entries. By default, the schedule interval is every 10 minutes. For more information about this invalidation process, seeCache invalidation.