Skip to main content
Version: 8.1.x

Optimizing Performance

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:

attributeValueByAttributeUidCache​

8.0.1

This cache is available as of version 8.0.1.

  • Objects Cached: Attribute Values
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

baseAmountCache​

  • Objects Cached: Base amounts
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-pricing.xml file

brandByCodeCache​

8.0.1

This cache is available as of version 8.0.1.

  • Objects Cached: Brands
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

bundlePriceAdjustmentCache​

  • Objects Cached: Bundle price adjustments
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-pricing.xml file

cachingAttributeServicefindByKeyCache​

  • Objects Cached: Attributes
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

cachingCategoryServiceFindDescendantCategoriesByUidCache​

7.5.1

This cache is available as of version 7.5.1.

  • Objects Cached: Descendant category unique identifiers
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

cachingCategoryServiceFindFeaturedProductsUidCache​

7.5.1

This cache is available as of version 7.5.1.

  • Objects Cached: Featured Products unique identifiers
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

catalogByCodeCache​

8.0.1

This cache is available as of version 8.0.1.

  • Objects Cached: Catalogs
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

catalogRuleBaseCache​

  • Objects Cached: Catalog promotion rules
  • Default TTL (Seconds): 300
  • Configuration Location: ep-core module: simple-timeout-caches.xml file

categoryByUidCache​

Replaces categoryLookupCache

  • Objects Cached: Categories
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/CATEGORY system setting

categoryUidByCompoundGuidCache​

  • Objects Cached: CategoryUids
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

categoryUidByGuidCache​

  • Objects Cached: CategoryUids
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

changedCatalogRuleBaseCache​

  • Objects Cached: Caches catalog rule base
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

changedStoreRuleBaseCache​

  • Objects Cached: Caches store rule base
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

childCategoryLookupCache​

  • Objects Cached: Child categories
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/CATEGORY system setting

dynamicContentDeliveryCache​

  • Objects Cached: Dynamic content
  • Default TTL (Seconds): 60
  • Configuration Location: ep-core module: simple-timeout-caches.xml file

groovyConditionCache​

  • Objects Cached: Groovy conditions
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core module: simple-timeout-caches.xml file

groovyEvaluationCache​

  • Objects Cached: Groovy evaluations
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core module: simple-timeout-caches.xml file

groovyScriptCache​

  • Objects Cached: Groovy scripts
  • Default TTL (Seconds): 86400
  • Configuration Location: ep-core module: simple-timeout-caches.xml file

priceListAssignmentCache​

  • Objects Cached: Price list assignments
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-pricing.xml file

productByUidCache​

Replaces productLookupCache

  • Objects Cached: Products
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/PRODUCT system setting

productCharacteristicsCache​

  • Objects Cached: Product characteristics
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

productForStoreCache​

7.5.1

This cache is available as of version 7.5.1.

  • Objects Cached: Store products
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

productTypeByNameCache​

8.0.1

This cache is available as of version 8.0.1.

  • Objects Cached: Product Types
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

productUidByGuidCache​

  • Objects Cached: ProductUids
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

productUidBySkuCodeCache​

  • Objects Cached: Caches a product UIDPK by a SKU code
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting

productUidBySkuGuidCache​

  • Objects Cached: Caches a product UID by a SKU GUID
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting

productUidBySkuUidCache​

  • Objects Cached: Caches a product UIDPK by a SKU UIDPK
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting

ruleBaseByScenarioCache​

  • Objects Cached: Caches rule base by scenario
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

ruleCache​

  • Objects Cached: Promotion rules
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

ruleCodeByRuleNameCache​

  • Objects Cached: Caches promotion rule codes by rule name
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

ruleCodeByRuleUidCache​

  • Objects Cached: Caches a promotion rule code by a promotion rule UIDPK
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

ruleCodesByRuleUidsCache​

  • Objects Cached: Caches a collection of rule codes by a collection of rule UIDPKs
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-rules.xml file

ruleSessionConfigurationCache​

  • Objects Cached: Promotion rule sessions
  • Default TTL (Seconds): 300
  • Configuration Location: ep-core module: simple-timeout-caches.xml

skuOptionsCacheEhCache​

  • Objects Cached: SKU options along with their values
  • Default TTL (Seconds): 86400
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

sortAttributeServiceDefaultSortAttributeForStoreCache​

7.5.1

This cache is available as of version 7.5.1.

  • Objects Cached: SortAttributes
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

sortAttributeServiceFindByStoreCodeAndLocaleCodeCache​

7.5.1

This cache is available as of version 7.5.1.

  • Objects Cached: SortValues
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-catalog.xml file

skuExistsBySkuCodeCache​

  • Objects Cached: Caches whether a SKU exists or not based on the SKU Code
  • Default TTL (Seconds): 3600
  • Configuration Location: COMMERCE/SYSTEM/CACHING/PRODUCTSKU system setting

storeCache​

  • Objects Cached: Stores
  • Default TTL (Seconds): 3600
  • Configuration Location: ep-core-caching module: cache-core.xml file

storeCartTypeCache​

  • Objects Cached: Caches names of CartTypes for a store
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-core.xml file

tagDefinitionCache​

  • Objects Cached: Caches tag definitions by GUID
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core module: service.xml file

tagDefinitionGuidCache​

  • Objects Cached: Caches tag definition GUIDs by tag definition name
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core module: service.xml file

taxCodeByCodeCache​

8.0.1

This cache is available as of version 8.0.1.

  • Objects Cached: Tax Codes
  • Default TTL (Seconds): 600
  • Configuration Location: ep-core-caching module: cache-tax.xml file

taxDocumentCache​

  • Objects Cached: Shopping cart tax calculations
  • Default TTL (Seconds): 300
  • Configuration Location: ep-core module: service.xml file

threadlocalStoreCache​

  • Objects Cached: Stores; Provided for backwards compatibility with storefront-enabled Self-Managed Commerce deployments
  • Default TTL (Seconds): 30
  • Configuration Location: ep-core module: simple-timeout-caches.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 categoryByUidCache 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.

OpenJPA Data Caching​

OpenJPA supports caching transactional persistent entities (anything submitted or updated regularly as an online transaction such as orders, payments and customers). By default, all relatively static objects, including catalog entities, are cached unless the following annotation is specified in the source code of the persistent entity class:

@DataCache(enabled = false)

OpenJPA is configured to use Ehcache for its data and query caches, as specified by jpa-persistence.xml in ep-core.

The OpenJPA L2 cache timeout defaults to one second so that data changes are immediately visible in development, QA, and staging environments. For live environments, cache timeouts can be increased to optimize performance using an external configuration file. See Configuring Ehcache for details.

For more information on configuring OpenJPA’s properties, see the OpenJPA User’s Guide.

Override Persistence Unit Properties​

Occasionally you may wish to override some of the properties defined in the core persistence unit, or add new properties. To do so, add the properties to the persistencePropertyOverrides map in the core extension’s ep-core-plugin.xml file. Do not add or change properties in any of the jpa-persistence.xml files, as the order in which these files are resolved cannot be guaranteed.