Configure the data caches
Home

IBM



Configure the data caches

All of the configuration so far actually applies to any WebSphere Application Server 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. WebSphere eXtreme Scale 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 WebSphere eXtreme Scale 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 (as introduced in 6.2, Overview of caching differences with eXtreme Scale.) to store output from expensive commands and store frequently accessed data. For more information about data caches, go to the following address:

http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=/com.ibm.commerce.admin.doc/tasks/tdccdccont.htm

Table 6-2 shows where you store dynamic cache data.

Table 6-2

Data cache type

Best cache environment

baseCache

This is the 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

Where to put cached data

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_installdir\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 WebSphere eXtreme Scale, the default object cache is already configured to use eXtreme Scale as the repository and no other configuration is needed (See Configure the WebSphere Commerce application servers form more information).

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. An example of an object cache instance configuration in a cacheinstances.properties file can be found in Example 6-10, which shows how the WebSphere eXtreme Scale provider is specified.

Example 6-10 Sample for additional command cache instances

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 WebSphere eXtreme Scale. An example of this is shown in Example 6-11.

Example 6-11 Sample for object caches using the default dynamic cache provider

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 Figure 6-17.

Figure 6-17 The Marketing Object Cache instances

Figure 6-18 shows 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.

Figure 6-18 Defining the cache provider

Replication domain settings can be used in the standard way as illustrated in Figure 6-19.

Figure 6-19 Replication settings


Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.