Is this really the version you are looking for? Kentico Xperience 8.1 Documentation is no longer updated. Use the switcher in the header to choose your product version.
Files represent a significant part of the data that browsers load when rendering web pages. Common examples of files are images, and web resources such as CSS stylesheets or JavaScript code files. The system provides two types of file caching mechanisms:
File caching works for the CSS stylesheet objects used in Kentico, even if they are not stored as physical files.
Client-side caching duplicates the data of previously requested files directly within browser applications or other clients (such as intermediate network caches). Client cache is the most efficient type of caching, because it allows browsers to access files without communicating with the web server. The system controls client caching by modifying the HTTP headers of file request responses.
To configure client-side file caching:
Open the Settings application.
Select the System -> Performance category.
Edit the settings in the Client-side file caching category:
Setting | Description |
|---|---|
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. The following values are possible:
|
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). |
Save the settings.
Clients (browsers) store files in their cache after requesting them for the first time (with an expiration time specified by the settings). Once the file expires, the client sends a revalidation request to the server, which can have the following results:
When a client requests an image or other file, Kentico stores the file's data in the application memory.
The system can then serve subsequent requests for the file without needing to access the database or file system.
To set how long the server-side cache retains files:
Files stay in the cache for the specified number of minutes.
Note
If your website stores large files in the database, you can limit caching of files that exceed a certain size. Specify the threshold by typing a number of kilobytes into the Maximum file size to cache setting. Files larger than the specified value are only cached for 1 minute, regardless of the Cache files (minutes) setting.