Settings - Performance

General

Enable output compression

Enables compression for the HTML output code of all pages rendered by Kentico.

Output compression requires compliance from client browsers. Browsers that do not support compression always download uncompressed page output.

Applies globally for all sites in the system.

Server content caching

Cache page info (minutes)

Sets the number of minutes for which the system caches page information (basic page properties and metadata). Kentico retrieves page information many times during the processing of a single page, so always set this value to at least 10 minutes.

When a page is modified, the system automatically clears the corresponding part of the page info cache. This type of caching cannot cause the website to display outdated information.

Cache content (minutes)

Sets the number of minutes for which web parts/controls with data sources cache their content (typically retrieved from the Kentico database).

You can override this value for specific web part instances by setting their Cache minutes property. Using 0 as the value disables content caching for the given web part instance.

It is recommended to cache all possible content. You can use cache dependencies to clear the cache on content changes. For most non-custom data sources, the default dependencies automatically ensure that web parts reload the cached content whenever the data is modified.

See also: Caching the data of page components

Use progressive caching

If checked, the system optimizes access to uncached data so that concurrent threads only use a single data access operation and share the results. This leads to better performance if the website is under a heavy load, without the drawback of not having the latest data available.

Server file caching

Cache files (minutes)

Sets the number of minutes for which the system caches images and other files on the server. Includes images, and web resources such as CSS stylesheets and JavaScript files.

The system automatically removes files from the cache if they are modified, so file caching cannot cause the website to display outdated content.

This setting also specifies the caching interval for Azure CDN, unless overwritten by the CMSAzureCDNCacheMinutes web.config key (see Reference - Web.config application keys for details).

See also: Caching files and resources

Maximum file size to cache

Limits caching of files whose size is greater than the specified number of kilobytes. Files larger than the specified value are only cached for 1 minute, regardless of the Cache files (minutes) setting.

Redirect files to disk

If enabled, the system redirects file requests for page attachments and content tree files to the corresponding physical file (if the requested file is stored in the file system).

Warning: The system stores files on the file system with GUID identifiers instead of names (to avoid conflicts). If you enable the Redirect files to disk setting, files downloaded by users have names in the GUID identifier format instead of the original file name.

Client caching

Client cache (minutes)

Sets the number of minutes for which clients consider cached files to be valid and up-to-date (i.e. the length of the client cache expiration time). Specifically, the setting determines how the server sets the Expires response header for file requests. Client file caching includes images and web resources such as CSS stylesheets.

The following values are possible:

  • 0 - cached files are always flagged as expired, so clients revalidate files on each request. Does NOT disable client caching for files.
  • More than 0 - until a cached file expires, clients load the file’s data from the cache without sending any requests to the server. Provides the best file performance, but may cause browsers to display outdated content (if cached files are modified before the expiration interval ends).

This setting only applies to dynamic files that are managed by the Kentico application, such as stylesheets in the CSS stylesheets application. Files stored on the file system may use a different client cache expiration time. For example, physical files served by the Kentico application through the GetResource.ashx handler use the CMSPhysicalFilesCacheMinutes web.config key (the default value is one week) and directly requested files use the IIS client cache configuration.

See also: Caching files and resources

Allow client cache revalidation

If enabled, the server adds the must-revalidate directive to the Cache-control response header of file requests. Ensures that caching clients always perform revalidation when requesting expired files (most clients revalidate by default even without the must-revalidate directive).

Output caching

Enable output caching

If enabled, the system allows output caching. Output cache stores the full HTML source of pages. If disabled, output caching is off on the whole website.

To enable output caching for pages, configure the Output cache properties of individual pages in the Pages application on the Properties -> General tab. Both the main website setting and page settings must be enabled to use output caching.

See also: Caching page output

Cache output in file system (minutes)

Specifies the number of minutes for which the system stores output cache in the file system. This provides persistent cache storage in case of application restarts.

If not set, only the standard caching mechanism (in memory) is used. If you enter a value, the system loads the output data of requested pages from the file system cache when it is not found in the memory cache.

To enable output caching in the file system for pages, configure the Allow file system cache property of individual pages in the Pages application on the Properties -> General tab.

Warning: Enabling the file system output cache may cause your website to serve outdated content. When clearing invalid output cache due to changes made to pages or other dependencies, the system only removes cache files if the corresponding cache item also exists in the memory. The file system cache remains outdated if the memory cache is not available when the invalidation occurs (for example after an application restart or if you have different expiration times set for the two caching types).

Output cache variables

Determines under which conditions the system stores multiple versions of the output cache for pages. Click Edit to change the default settings.

For example, the username variable ensures that the system stores a separate version of each page’s output cache for every logged in user. If disabled, the output cache does not distinguish between users — if a page’s output is cached for one user, the system may load the same content for all other users (depending on the remaining output cache variables).

You can enable or disable separate output cache for:

  • username - every logged in user (public users share the same output cache).
  • sitename - every site in the system (leave checked unless your sites all have identical content on pages with the same path).
  • lang - each language version of pages.
  • browser - different types of web browsers.
  • cookielevel - the cookie level preferences of visitors.
  • deviceprofile - the device profiles detected for visitors.
  • domain - the website domain name (check to disable output cache sharing between different domain aliases of sites).
  • viewmode - the page view modes used by Kentico, such as design, edit, preview or live site. Currently, the system only uses caching for the live site view mode.

The output cache always creates separate cache items based on the:

  • Page path (including the virtual directory and extension)
  • Protocol in the request URL

Enable partial caching

If enabled, the system allows partial caching of web parts. The partial cache stores the HTML output of individual web part instances. If not checked, partial caching is disabled on the whole website for all web parts.

By default, web parts do not use partial caching. You need to enable partial caching for individual web part instances using the Partial cache minutes property.

See also: Caching portions of the page output

Partial cache variables

Determines under which conditions the system stores multiple versions of the partial cache for web parts. Applies globally to the partial cache of all web parts.

Click Edit to change the default settings.

For example, the lang variable ensures that each web part instance has a separate version of the partial cache for every language. If disabled, the partial cache does not distinguish between languages — if a web part’s output is cached for one language, the system loads the same content for all languages (depending on the remaining partial cache variables).

You can enable or disable separate partial cache for:

  • username - every logged in user (public users always share the same partial cache).
  • sitename - every site in the system (leave checked unless your sites have identical content).
  • lang - each language version of pages.
  • browser - different types of web browsers.
  • viewmode - the page view modes used by Kentico, such as design, edit, preview or live site. Currently, the system only uses caching for the live site view mode.

Resources (global settings only)

Allow resource compression

If enabled, the system compresses JavaScript and CSS stylesheet web resources before sending them to the client browser. This reduces the amount of data that must be loaded. Uncompressed versions remain available for browsers that cannot process compressed data.

Minification of the given resource type must be enabled (via the Allow JavaScript/CSS minification settings) in order for compression to be applied.

Allow JavaScript minification

Indicates if JavaScript resources should be minified before they are served to the client browser. Minified code has a reduced size, which saves bandwidth and decreases response times, but may not be suitable for debugging.

Note: JavaScript minification does not work on instances running on Microsoft Azure Cloud Services.

Allow CSS minification

Indicates if CSS stylesheet resources should be minified before they are served to the client browser.

CSS Styles (global settings only)

Resolve macros in CSS

If checked, macro expressionscan be used in CSS stylesheets to dynamically insert the content of other stylesheets.

To insert this type of macro, add an expression into the code of a stylesheet according to the following format: {%CSS[“<stylesheetname>”]%}

Warning: If you wish to disable this setting, you first need to remove all occurrences of macros from your stylesheets. Unresolved macro expressions are not valid CSS code, so browsers cannot process stylesheets containing macros.

Allow CSS from components

If enabled, CSS styles defined for individual page components (e.g. web parts, page templates etc.) are automatically requested by the page where they are placed. Otherwise, you either need to have all styles defined in the website’s stylesheet, or link the styles of the required components into the stylesheets via CSS macros.

Combine CSS from components

If enabled, pages load the CSS styles of all contained components via a single request. Otherwise different types of components each generate a separate request. The styles of multiple components of the same type (e.g. several web parts) are always retrieved by a single request.

Combining the CSS requests into one may improve the load time of individual pages and is recommended in most cases.