Application Data Caching
Application Data Caching
Available Caches
Elastic Path provides several out-of-the-box application caches that are used to improve performance. The table below lists all available caches and their default timeout values in seconds as well as configuration locations:
Cache Name | Objects cached | Default TTL (seconds) | Configuration location |
---|---|---|---|
baseAmountCache | Base amounts | 600 | ep-core-caching module: cache-pricing.xml file |
bundlePriceAdjustmentCache | Bundle price adjustments | 600 | ep-core-caching module: cache-pricing.xml file |
catalogRuleBaseCache | Catalog promotion rules | 300 | ep-core module: simple-timeout-caches.xml file |
categoryLookupCache | Categories | 3600 | COMMERCE/SYSTEM/CACHING/CATEGORY system setting |
childCategoryLookupCache | Child categories | 3600 | COMMERCE/SYSTEM/CACHING/CATEGORY system setting |
dynamicContentDeliveryCache | Dynamic content | 60 | ep-core module: simple-timeout-caches.xml file |
groovyConditionCache | Groovy conditions | 3600 | ep-core module: simple-timeout-caches.xml file |
groovyEvaluationCache | Groovy evaluations | 600 | ep-core module: simple-timeout-caches.xml file |
groovyScriptCache | Groovy scripts | 86400 | ep-core module: simple-timeout-caches.xml file |
priceListAssignmentCache | Price list assignments | 600 | ep-core-caching module: cache-pricing.xml file |
productCharacteristicsCache | Product characteristics | 600 | ep-core-caching module: cache-catalog.xml file |
productLookupCache | Products | 3600 | COMMERCE/SYSTEM/CACHING/PRODUCT system setting |
productUidBySkuCodeCache | Caches a product UIDPK by a SKU code | 3600 | COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting |
productUidBySkuGuidCache | Caches a product UID by a SKU GUID | 3600 | COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting |
productUidBySkuUidCache | Caches a product UIDPK by a SKU UIDPK | 3600 | COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting |
ruleCache | Promotion rules | 600 | ep-core-caching module: cache-rules.xml file |
ruleCodeByRuleNameCache | Caches promotion rule codes by rule name | 600 | ep-core-caching module: cache-rules.xml file |
ruleCodeByRuleUidCache | Caches a promotion rule code by a promotion rule UIDPK | 600 | ep-core-caching module: cache-rules.xml file |
ruleCodesByRuleUidsCache | Caches a collection of rule codes by a collection of rule UIDPKs | 600 | ep-core-caching module: cache-rules.xml file |
ruleSessionConfigurationCache | Promotion rule sessions | 300 | ep-coremodule: simple-timeout-caches.xml |
storeCache | Stores | 3600 | ep-core-caching module: cache-core.xml file |
skuExistsBySkuCodeCache | Caches whether a SKU exists or not based on the SKU Code | 3600 | COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting |
tagDefinitionCache | Caches tag definitions by GUID | 600 | ep-core module: service.xml file |
tagDefinitionGuidCache | Caches tag definition GUIDs by tag definition name | 600 | ep-core module: service.xml file |
taxDocumentCache | Shopping cart tax calculations | 300 | ep-core module: service.xml file |
threadlocalStoreCache | Stores. Provided for backwards compatibility with storefront-enabled Elastic Path Commerce deployments. | 30 | ep-core module: simple-timeout-caches.xml file |
ruleBaseByScenarioCache | Caches rule base by scenario | 3600 | ep-core-caching module: cache-rules.xml file |
changedStoreRuleBaseCache | Caches store rule base | 3600 | ep-core-caching module: cache-rules.xml file |
changedCatalogRuleBaseCache | Caches catalog rule base | 3600 | ep-core-caching module: cache-rules.xml file |
Configuring Caches via Settings Framework
The settings framework can configure several caches. Each cache has three settings:
- timeToIdle: Sets the time to idle for an element before it expires in seconds.
- timeToLive: Sets the time to live for an element before it expires in seconds.
- maxEntriesLocalHeap
For example, to change the timeToIdle and timeToLive values for categoryLookupCache and childCategoryLookupCache to 5 minutes, change the values of the COMMERCE/SYSTEM/CACHING/CATEGORY/timeToLive and COMMERCE/SYSTEM/CACHING/CATEGORY/timeToIdle settings to 300. Note that the changes will not take effect until the application is restarted. For details on how to change these system settings, see Configuring System Settings.
Configuring Caches via Ehcache
All caches can be configured using Ehcache configuration files as described in Configuring Ehcache. This will override any compile-time or settings framework configuration.