Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Configuring Request-Scoped Caching

Configuring Request-Scoped Caching

Configuring Cache Eviction

By default, the request-scoped cache is configured to evict cached entries after 60 sec and when the number of cached entries reaches 2147483647. Parameters are configurable via the RelOS Request Cache OSGi configuration in the Apache Felix Web Console. Caches are destroyed and rebuilt when configuration values are updated through the Felix console.

Logging Caching

To activate cache logging, add the following to the logback.xml file located in the cortex/relos/logback-config/src/main/filtered-resources/ directory.
<logger name="" level="TRACE"/commerce-legacy/>
Cache logging dramatically decreases cache performance as it will log a lot of information.
To see the resource operation's external operation ID, add the following to logback.xml:
<logger name="" level="TRACE"/commerce-legacy/>

Cache Metrics Monitoring

Request-scoped cache metrics are exposed as MBeans over Cortex's JMX API. The metrics Mbeans are identified by the naming pattern EP-RelOS.*.RequestCache.*.

Metrics available to monitor:
  • evictionCount – number of times entries have been evicted
  • hitCount – number of times entries have been looked up and found
  • hitRate – ratio of cache request which were hits
  • loadCount – number of times entries have been looked up
  • missCount – number of times entries have been looked up and missed
  • missRate – ratio of cache requests which weren't hits
  • requestCount – number of times entries have been looked up