Document Tree
Document Properties
Kbid
27727M
Last Modified
20-Oct-2020
Added to KB
20-Jul-2016
Public Access
Everyone
Status
Online
Doc Type
Guidelines
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
Guide - Cache Engine Administration

Introduction

Info

This document is valid from 7.10.19.0, for previous versions refer to Guide - Cache Engine Administration (valid to 7.10.18.0).


This document approaches the caching system of Intershop Commerce Management from the configuration perspective. It is addressed to administrators or DevOps who configure and maintain Intershop Commerce Management instances. This document does not describe the cache management framework. For details about the cache engine implementation, refer to Concept - Cache Management.

Note

All relevant setup options are to be configured in advance via dedicated deployment script files, before actually executing the deployment. So be aware that if you modify the Intershop Commerce Management configuration after it is deployed, all changes will be overridden with the settings specified for your deployment.

The Cache Engine provides a mechanism to manage and perform cache operations (clear, enable/disable, configure, etc.) for all Intershop Commerce Management caches on all application servers within the installation. The cache engine is implemented within the cartridge Cache. The Intershop Commerce Management administrator can monitor the cache efficiency and size, refresh the information, and change certain values for some caches.

There are four cache groups that are managed via the cache engine:

  • ORMCache (persistent objects)
  • ObjectCache (Least Recently Used or LRU)
  • PageCache
  • SearchIndexReloadable


There are two implementations of ObjectCaches: An old one, based around the ObjectCache interface and managed by the Component Framework and a new one, based around the Cache<K,V> interface and managed by Google Guice. This page shows the configuration and monitoring of both variants.

Guava ObjectCaches (since 7.10.19.0)

Configuration of caches can be done with the Configuration Framework. Let CacheID be the ID of a cache to be configured.

Cache Metrics (since 7.10.25.0)

All cache metrics start with intershop_cache_. Each cache has an individual cache key.

PromotionsCache metrics
# HELP intershop_cache_hit_total Cache hit totals
# TYPE intershop_cache_hit_total counter
intershop_cache_hit_total{cache="PromotionsCache",}
# HELP intershop_cache_miss_total Cache miss totals
# TYPE intershop_cache_miss_total counter
intershop_cache_miss_total{cache="PromotionsCache",}
# HELP intershop_cache_requests_total Cache request totals, hits + misses
# TYPE intershop_cache_requests_total counter
intershop_cache_requests_total{cache="PromotionsCache",}
# HELP intershop_cache_load_success The number of times the loading of a previously uncached value was successful.
# TYPE intershop_cache_load_success counter
intershop_cache_load_success{cache="PromotionsCache",}
# HELP intershop_cache_load_exception The number of times the loading of a previously uncached value resulted in an exception.
# TYPE intershop_cache_load_exception counter
intershop_cache_load_exception{cache="PromotionsCache",}
# HELP intershop_cache_load_time The total number of nanoseconds the cache has spent loading new values.
# TYPE intershop_cache_load_time counter
intershop_cache_load_time{cache="PromotionsCache",}
# HELP intershop_cache_eviction_total Cache eviction totals, doesn't include manually removed entries
# TYPE intershop_cache_eviction_total counter
intershop_cache_eviction_total{cache="PromotionsCache",}
# HELP intershop_cache_hit_ratio The ratio between cache hits and total cache requests in percent.
# TYPE intershop_cache_hit_ratio gauge
intershop_cache_hit_ratio{cache="PromotionsCache",}
# HELP intershop_cache_size Cache size
# TYPE intershop_cache_size gauge
intershop_cache_size{cache="PromotionsCache",}

Enable and Disable Caches

Configuration keyConfiguration valueDefault
intershop.caches.<CacheID>.enabledA boolean whether this cache should be enabled or disabledtrue

Configuration

Configuration of caches can be done with the configuration framework. Let CacheID be the ID of a cache to be configured. The following keys are available:

Configuration keyConfiguration valueDefault
intershop.caches.<CacheID>.guava.configThe string syntax is a series of comma-separated keys or key-value pairs

The value of intershop.caches.guava.config

intershop.caches.guava.configThe string syntax is a series of comma-separated keys or key-value pairs that is used as a default in case the cache specific configuration is not setrecordStats,concurrencyLevel=16,initialCapacity=100,maximumSize=2000

The value of the key "intershop.caches.<CacheID>.guava.config" is a string representing the configuration of the cache, according to the specification of Google Guava.

Configuration ParameterTypeDefault
concurrencyLevelinteger16
initialCapacityinteger100
maximumSizelong2000
maximumWeightlong
expireAfterAccessduration
expireAfterWriteduration
refreshAfterWriteduration
weakKeys
no
softValues
no
recordStats
yes

Durations are represented by an integer, followed by one of "d", "h", "m", or "s", representing days, hours, minutes, or seconds respectively. (There is currently no syntax to request expiration in milliseconds, microseconds, or nanoseconds.)

Whitespace before and after commas and equal signs is ignored. Keys may not be repeated; it is also illegal to use the following pairs of keys in a single value:

  • maximumSize and maximumWeight
  • softValues and weakValues

Example PromotionsCache:

intershop.caches.PromotionsCache.guava.config=recordStats,concurrencyLevel=16,initialCapacity=100,maximumSize=10000

Former Intershop Specific Implementation of ObjectCaches and other Caches

Cache management via the cache engine is made possible by means of Java MBeans. MBeans are manageable resources in Java, and in Intershop Commerce Management MBeans are managed with JMX tools (see Guide - JMX and MBean Support). It should be noted that the cache engine handles a number of operations and thus, there is no UI specific to the cache engine in System Management or Commerce Management.

Cache Engine Messaging Settings

If there are several Intershop Commerce Management clusters in one subnet, a cluster may receive events from a foreign cluster if both clusters happen to be using the same multicast IP and port. In this case, you have to specify a unique multicast IP and port for each cluster in the cache.properties files, located in <IS.INSTANCE.SHARE>/system/config/cluster/.

The corresponding default settings (prefixed intershop.cacheengine.wrapped) are listed below.

If you intend to use other messaging systems than the default multicast, you must enable and adjust the corresponding intershop.cacheengine properties (see Guide - Messaging).

cache.properties
intershop.cacheengine.wrapped.messengerClass=
  com.intershop.beehive.messaging.internal.multicast.MulticastMessenger
intershop.cacheengine.wrapped.multicastAddress=239.1.2.3
intershop.cacheengine.wrapped.multicastPort=1234
#intershop.cacheengine.wrapped.multicastInterface=
#intershop.cacheengine.wrapped.multicastTimeToLive=
#intershop.cacheengine.wrapped.multicastReceiveBufferSize=1048576
intershop.cacheengine.wrapped.multicastListenerThreads=5
intershop.cacheengine.wrapped.multicastPacketSize=65000

Monitoring Cache Activity

To monitor cache activity, select the MBean tab in JVisual VM or JConsole (see Guide - JMX and MBean Support). Expand the com.intershop.enfinity tree structure. The resources (sets of MBeans) we are concerned with are CacheClearProcessor, CacheInformation and ClearableCaches. A description of each resource is listed in the table below.

Cache ResourceDescription
com.intershop.enfinity

CacheClearProcessorThis resource empties the objects within the ClearableCaches resource.


BatchCacheClearCaches included here are cleared as a batch immediately or at a late time. For example, after a product upload has occurred.


InstantCacheClearClears all Java VM caches included here based on conditions specified in the Intershop Commerce Management installation.


ORMCacheSyncCacheClearClears local caches included here on the Java VM immediately based on conditions specified in the Intershop Commerce Management installation.

CacheInformationThis resource displays cache attribute values (i.e., actual size, HitCount, Ratio, etc.). You can reset the monitor under the operations tab.


ORMCacheDisplays data for Intershop Commerce Management classes, connections and transactions monitoring.


PageCacheDisplays data for all sites within an Intershop Commerce Management instance.


and morecustom caches

CachesThis resource allows you to configure cache attributes (size, capacity, etc.), clear and enable/disable a cache.


ORMCachesORM caches can be cleared here.


ObjectCachesObject caches can be cleared here.


PageCachesPage caches can be cleared here.


SearchIndexesSearch index caches can be cleared here.


SearchIndexReloadableDisplays data for content search within a given context (i.e., 'DE Specials' or 'US Specials').

Since the administrator must clear one or more caches from time to time, it is important that they are cleared in the following order:

(1) ORM

(2) ObjectCache

(3) SearchIndex

(4) PageCache

When clearing the page cache, it is necessary that the site has page caching enabled as well as keyword processing and text indexing selected. You can view/change the attributes for each site by entering System Management | Site Management | <your-site-name>-Site | Page Cache.

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.