- Caching strategy
When you plan a caching strategy for HCL Commerce, considerations such as which pages will be cached, and where they will be cached are important. These decisions are influenced by whether you are caching a local (Transaction) server, or a remote (Store) server. To help with these decisions, consider the following approaches.
- Environment setup
To help prepare your environment, see Enabling the dynamic cache service and servlet caching. The cache monitor application, CacheMonitor.ear, must be installed. WebSphere Application Server provides a Dynamic Cache Monitor application to show cache statistics, Edge Side and disk statistics, cache entries, dependency IDs, and cache policy information. To inspect the contents and behavior of the WebSphere Application Server dynamic cache, install the WebSphere Application Server Dynamic Cache Monitor.
- Configuring the dynamic cache service in cachespec.xml
The dynamic cache service is an in-memory cache system that has disk offload capability. Cacheable objects are defined in the cachespec.xml file.
- Allowing access to encrypted parameters
Cache identifiers are based on non confidential information such as store, language, catalog, category, or product identifiers. These identifiers are typically encrypted in the URL. If the parameters are encrypted, a cache miss would result due to missing parameters for the cache ID.
- Cache identifiers
When the dynamic cache service places an object in the cache, it labels it with a unique identifying string known as a cache ID. The cache ID is constructed according to<cache-id>
rules specified in the <cache-entry>
elements. The <cache-id>
rules define how to construct cache-ids from information that is associated with an application server request.
- Custom request attributes for servlet caching
You can create custom request attributes for servlet caching by adding them to the <map>
tag.
- Production environments
Operating HCL Commerce in a production environment introduces complexities. For example, accessing cache entries that have been offloaded from memory introduces overhead associated with reading from and writing to the disk. Invalidating these entries is time consuming. Therefore, it is important to tune the cache using the available properties. By setting these values to the appropriate values, you improve the cache invalidation process.