HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Cache options and methods

Explains the caching concept in Optimizely Content Management System (CMS), and the different caching options and methods available.

Cache options

Optimizely Content Management System (CMS) supports IIS kernel caching and cache expiration settings for files, resources, and images, and manages caching across the web front-end servers, minimizing the amount of communication with the database. CMS stores the cache and other resources (that are used by the templates) in CMS. You can configure and extend the cache. CMS supports the caching methods listed below.

Object cache

CMS automatically caches objects that are requested from the API, such as content instances. CMS bases the object cache on the ASP.NET runtime cache and stores only read-only objects for better performance. An event system manages invalidation with support for load-balanced servers.

This cache improves scalability with an optimistic locking approach. When multiple threads are reading the same data, they attach to the same database calls to avoid putting too much load on the database for objects that are not yet cached. See Object caching.

Output cache

Optimizely bases output caching on the standard ASP.NET Output Caching, and caches the entire rendered markup of a web page or user control for a specified duration. The cache is automatically invalidated when content is updated. You can define dependency rules for the cache, and the website you want to affect. 

Browser cache

You can configure rules for browser (client) caching. For example, you can set a time period in which static files delivered by the CMS are cached by the client. You also can define how long dynamically generated pages are cached on the client.

File cache

You can cache files from CMS to the client, or to the client and server. The server cache uses the IIS kernel cache, which delivers files directly by the IIS kernel, offering superior performance. The client cache lets you set a time period to cache a specific folder.

Dynamic Data Store cache

Dynamic Data Store (DDS) offers an API and infrastructure for the saving, loading and searching of both compile time data types (.NET object instances) and runtime data types (property bags).

DDS uses a two-level cache:

  • The first level is a normal collection of objects that reside in memory with the context until the context is no longer in scope.
  • The second level cache provides a default ASP.NET runtime cache implementation to the DDS. Objects are in deconstructed form, meaning they do not hold hard references to each other and may be invalidated from the cache individually, thereby maximizing cache efficiency. ASP.NET decides when and how it releases objects from memory, if CMS does not remove the objects due to updates.

Static Files cache

You can configure how CMS adds the cache information to the response headers at request of static files, so the client can cache files instead of being served by the web server at each request. This significantly reduces the total request time for a client. Use standard IIS settings to configure caching for static files.