Enable sliding cache expiration in Commerce Engine Connect

Current version: 10.1

You can enable sliding cache expiration on the Commerce Engine Connect cache. The sliding cache allows frequently requested entities to be stored for longer, which means quicker access to data when responding to Storefront requests. When using the sliding cache, the cache duration increases by the specified value every time the data is requested. The more often an entity is requested, the longer it remains in the cache. Rarely requested entities do not remain in cache.

By default, the sliding expiration is disabled.

To enable sliding expiration on the Commerce Engine Connect cache:

  1. Open the \wwwroot\<Sitecore>\App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.Connect.config file.

  2. In the cacheEntry configuration section, add the slidingExpiration property with the required value (in milliseconds). For example:

     <cacheEntry type="Sitecore.Commerce.Engine.Connect.CacheEntrySettings, Sitecore.Commerce.Engine.Connect.Caching">

Do you have some feedback for us?

If you have suggestions for improving this article,