Administer > Dynamic caching > Prepare to use caching in WebSphere Commerce > Environment setup
Enable the dynamic cache service and servlet caching
Dynamic cache is enabled by default. Servlet caching is enabled by default.
In the development environment servlet caching needs to be enabled.
Configure the baseCache to use the default Dynamic Cache service provider
- Verify dynamic cache service is enabled
- Open the WebSphere Application Server administrative console.
- Click...
Servers | Server Type | WebSphere application servers | Commerce_App_Name | Container services | Dynamic cache service
- From the Cache provider list, select Default dynamic cache.
- Optional: If more than one server is defined, check Enable cache replication.
- In the Cache size field, specify a cache size. Start with the default setting of 2000.
- In the Memory Cache Size section, ensure that the Limit memory cache size check box is not selected.
- In the Disk Cache settings section, ensure that the Enable disk offload check box is selected.
- To flush the disk when the server is stopped, choose the Flush to disk option. If this option is selected, the existing disk cache is used when the server restarts. Any invalidations issued by other servers while the server is down are not processed. As a result, stale cached data might be used when the server restarts.
- To limit the size of the disk cache, choose from the following options:
- Limit disk cache size in GB
- Specify a value for disk cache size.
- Limit disk cache size in entries
- Specify a maximum number of cache entries
- In the Performance settings section, select High performance and high memory usage. Note that the memory usage increases in proportion with the disk cache size.
- In the Eviction policy section, select Random from the Algorithm list. In the High threshold field, specify 80%. In the Low threshold field specify 70%.
- Optional: If more than one server is defined, in the Consistency Settings section, select a replication domain. If no domain is displayed in the list, click Create a new replication domain.
- Optional: In the Replication type section, select Start with Not Shared and in the Push frequency field type 1.
- Click Apply.
- Click Servers > Application Servers > your_Commerce_Application_Name > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties
- Define the following properties, if they are not already defined:
Custom Property Name Value com.ibm.ws.cache.CacheConfig.filterLRUInvalidation true com.ibm.ws.cache.CacheConfig.filterTimeOutInvalidation true com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation true com.ibm.ws.cache.CacheConfig.ignoreValueInInvalidationEvent true com.ibm.ws.cache.CacheConfig.useServerClassLoader true For more information see, Recommended Dynacache settings for WebSphere Commerce
Configure the baseCache to use the WebSphere eXtreme Scale service provider
- Open the WebSphere Application Server administrative console.
- Click...
Servers | Server Type | WebSphere application servers | your_Commerce_Application_Name | Container services | Dynamic cache service
- From the Cache provider list, select WebSphere eXtreme Scale.
- In the Cache size field, specify a cache size. Start with the default setting of 2000.
- Select the Enable cache replication check box.
- Click Apply.
- Click...
Servers | Application Servers | your_Commerce_Application_Name | Java and Process Management | Process Definition | Java Virtual Machine | Custom Properties
- Define the following properties, if they are not already defined:
Custom Property Name Value com.ibm.ws.cache.CacheConfig.filterLRUInvalidation true com.ibm.ws.cache.CacheConfig.filterTimeOutInvalidation true com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation true com.ibm.ws.cache.CacheConfig.ignoreValueInInvalidationEvent true com.ibm.ws.cache.CacheConfig.useServerClassLoader true com.ibm.websphere.xs.dynacache.disable_recursive_invalidate true com.ibm.websphere.xs.dynacache.ignore_value_in_change_event true com.ibm.websphere.xs.dynacache.enable_compression true com.ibm.websphere.xs.dynacache.topology remote