Solr query result caching
Search server performance can be improved by caching Solr query results.
The search server data cache uses
DistributedMap
object caches which are
defined automatically during feature pack installation. A new object cache for Solr
query caching has been added to cache Solr query results. Solr query results are cached
in the object cache with JNDI name,
services/cache/SearchQueryDistributedMapCache. It is defined as
follows:
<distributedMap id="SearchQueryDistributedMapCache" jndiName="services/cache/SearchQueryDistributedMapCache" memorySizeInMB="400" memorySizeInEntries="30012" highThreshold="98" lowThreshold="95"/>
The new cache is enabled by default
in HCL Commerce Version 9.1. To disable it, set the following configuration
property value to false within the
com.ibm.commerce.search-ext/wc-component.xml configuration
file:
<_config:property name="CrossTransactionCache/com.ibm.commerce.search.internal.expression.processor.SearchExpressionProcessor/enabled" value="true"/>
To know more on how to change properties in the component configuration file
(wc-component.xml) refer to Changing properties in the HCL Commerce configuration file (wc-component.xml)
Important: As with all caching
configuration changes, be aware of the additional memory used for caching, and
ensure the JVM has at least 35% free memory after each full Garbage Collection
cycle. The memorySizeInMB="400" setting mentioned above is an estimated maximum
amount of additional memory to be used by this new object cache. The actual memory
used may exceed the specified setting. Determine the actual memory used, run
representative test scenarios in a test environment, and obtain and examine verbose
GC and heapdump files.