Cache settings

Overview 

With Sitefinity CMS, you can configure the way your content and pages are cached which affects and optimizes the overall performance of your system. You do this by configuring cache profiles that include both the output and client cache. You can apply cache profiles globally on application level or choose which specific profile to apply on a page or library level.

When Sitefinity CMS pages are loaded for the first time, they go through the following main stages:

  • Compilation
    This is the compiling of the page and all the widgets on the page. The widget properties are queried from the database and the widgets are compiled with the properties.
    When a page is updated in the backend, it will force the page to be recompiled on its next request.
  • Output generation
    This is the output generated from the requested page URL. This is the static HTML of the page and its output is cached. This provides the ability to serve the page immediately when it is in the output cache, because the HTML is already generated - the page and the widgets are already compiled and served directly.

Process

In Sitefinity CMS yo have various options to configure output, client, and other types of cache. 

Generally, you have the following stages in configuring cache:

  1. Turn on the cache for the entire web application
    First, you should decide whether you want to use output or client cache, or both. Turning on and off caching applies to all of the sites of your Sitefinity CMS instance.
    For more information, see Administration: Global cache settings.
  2. Configure specific cache profiles for all pages and libraries.
    You configure different cache profiles, which can be both output or client cache. You then apply a default cache profile for pages and for different media libraries. These profiles apply to all of the sites of your Sitefinity CMS instance.
    For more information, see Administration: Configure cache profiles.
  3. Configure the caching of specific pages and libraries
    You can then apply different cache profile or turn off caching for any particular page or root media library.
    For more information, see Administration: Cache for pages and libraries.
  4. Substitute the caching of particular widgets
    You can then change the default caching behavior of particular widgets, located on a page that is cached. You do this by using cache substitution.
    For more information, see For developers: Use a cache substitution widget.
  5. Configure the caching of database
    You can also turn on and off caching of the database. By default, the caching is turned on.
    For more information, see Other cache settings » Database caching
  6. Configure the L2 caching of database queries for particular types
    By default, all types have L2 caching turned on. You can exclude a particular type.
    For more information, see Administration: L2 cache strategies.
  7. Configure other caching options
    Finally, configure the caching of permission, page compilation, RSS feeds.
    For more information, see Administration: Output cache for RSS and Other cache settings.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?