Configure the data caches
Home | Previous | Next


Configure the data caches

All of the configuration so far actually applies to any WAS use of the dynamic cache. Now we are going to consider WebSphere Commerce-specific tuning. So far you have configured all the dynamic caching, by default, to be stored in WebSphere eXtreme Scale. This is not actually the best place for all Commerce cached data.

WXS is a remote cache, but WebSphere Commerce is assuming all data is local, so it makes frequent access to certain types of data, such as user data. Placing these small but frequently accessed pieces of data into WXS impacts performance, so set up the environment to continue to use the default dynamic cache provider for those.

The WebSphere Commerce data caches use dynamic cache APIs to store output from expensive commands and store frequently accessed data.

Where you store dynamic cache data...

Data cache type Best cache environment
baseCache

Default servlet cache, which we have already configured.
Assume all web content fits into this category

WebSphere eXtreme Scale
Command caching WebSphere eXtreme Scale
Object caches (for DistributedMap data) Default dynamic cache provider

Command caching

A command data cache stores the response from expensive business logic methods. These caches are enabled by providing a cachespec.xml file that defines which command responses to cache and for how long. WebSphere Commerce provides a range of command caching configuration, with an example cachespec.xml file that can be found in:

COMMERCE_HOME/samples/dynacache/cachespec.xml

Because this configuration file does not define where it is going to store data, it will use the object cache called default, which is automatically configured on an application server.

Because you set the dynamic cache provider on the Commerce application server to use WXS, the default object cache is already configured to use eXtreme Scale as the repository and no other configuration is needed

If there are additional command caches that need to be created, they can be configured in the administrative console, under...

Resources | Cache instances | Object Cache instances

...or by deploying a cacheinstances.properties file with the application.

cache.instance.0=/services/cache/SampleCache
cache.instance.0.cacheSize=2000
cache.instance.0.disableDependencyId=false
cache.instance.0.enableCacheReplication=true
cache.instance.0.filterLRUInvalidation=true
cache.instance.0.filterTimeOutInvalidation=true
cache.instance.0.disableTemplatesSupport=true
cache.instance.0.ignoreValueInInvalidationEvent=true
cache.instance.0.useServerClassLoader=true
cache.instance.0.cacheProviderName=com.ibm.ws.objectgrid.dynacache.CacheProviderImpl
cache.instance.0.com.ibm.websphere.xs.dynacache.disable_recursive_invalidate=true
cache.instance.0.com.ibm.websphere.xs.dynacache.ignore_value_in_change_event=true
cache.instance.0.com.ibm.websphere.xs.dynacache.enable_compression=true
cache.instance.0.com.ibm.websphere.xs.dynacache.topology=remote


Object caches

The data caches that use the DistributedMap APIs are used for storing Java objects. The object cache instances can be configured in the administrative console (under Resources Æ Cache instances Æ Object Cache instances) or by deploying a cacheinstances.properties file with the application.

Store the DistributedMap data in the default dynamic cache provider. These data caches can therefore be configured as they would be without WXS.

cache.instance.0=/services/cache/WCSystemDistributedMapCache
cache.instance.0.cacheSize=1000
cache.instance.0.enableDiskOffload=false
cache.instance.0.flushToDiskOnStop=false
cache.instance.0.useListenerContext=false
cache.instance.0.replicationType=4
cache.instance.0.disableDependencyId=false
cache.instance.0.filterTimeOutInvalidation=true
cache.instance.0.filterLRUInvalidation=true
cache.instance.0.ignoreValueInInvalidationEvent=true
cache.instance.0.disableTemplatesSupport=true
cache.instance.0.useServerClassLoader=true
cache.instance.0.enableCacheReplication=true
cache.instance.1.replicationDomain=DataCacheRepDomain

Alternatively, the same configuration can be done in the administrative console. For example, the Marketing object cache instances are shown in below...

Here is a sample configuration for setting an object cache to use the default dynamic cache provider. The values shown are for illustration only, but demonstrate how to ensure the cache provider is set.

Replication domain settings can be used in the standard way...


+

Search Tips   |   Advanced Search