Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Caching

Describes caching for Optimizely Commerce Connect 13 and how caching is used for product catalogs and entries.

Platform cache functionality, including remote synchronization, is part of the Optimizely platform.  

Classes in this topic are in the Mediachase.Commerce.Catalog namespace. 

Cache subsystem

Caching for each subsystem, such as catalogs and orders, is configured in its respective configuration files. For a catalogs example, see ecf.catalog.config in the site's configs folder.

Example: Cache settings for the Catalogs subsystem

<Cache enabled="true" 
       collectionTimeout="0:1:0" 
       entryTimeout="0:1:0"
       nodeTimeout="0:1:0" 
       schemaTimeout="1:0:0"/>

The collectionTimeout responds to an entry array, and "entry" responds to a single entry. What is actually cached is the CatalogEntryDto and, because the Entry object is created from the Data Transfer Object (DTO), you cache the DTO. In some cases, you also can cache the entry objects themselves rather than the DTO.

Cache invalidation

In the Catalogs subsystem example, the cache is invalidated if it reaches the cache timeout specified above (0:1:0) for the request type or if an object is updated. You also can invalidate cache for the entire catalog by calling CatalogCache.Clear().