LiteSpeed Web Server Users' Manual

Version 5.1 Rev. 4

Page Cache Settings

Table of Contents

Cache Storage Settings

Storage Path | Enable LiteMage | Cache Manager Path | Public Storage Expire (minutes) | 

Cache Policy

Enable Public Cache | Check Public Cache | Max Object Size | Cache Expire Time (seconds) | Cache Stale Age (seconds) | Cache Request with Query String | Cache Request with Cookie | Cache Response with Cookie | Ignore Request Cache-Control | Ignore Response Cache-Control | Enable Private Cache | Check Private Cache | Private Cache Expire Time (seconds) | 

Do-Not-Cache URL

Do-Not-Cache URL | 

Do-Not-Cache Domains

No Cache Domain | 

Storage PathGo to top

Description

Specifies the directory for holding cached objects. Currently, LiteSpeed Cache stores each object in its own file. The filename is a hash of the object key. Multiple levels of directories will be created in order to avoid holding too many files in one directory. This value must be set at the Server level in order to enable cache. Virtual Host level settings will override Server level settings.

Syntax

path

Tips

[Performance] Assign a dedicated disk or disk array as the cache storage. RAID0 is recommended.

It is recommended to set a different cache storage path for each Virtual Host to prevent purge all requests from affecting other Virtual Hosts.

Enable LiteMageGo to top

Description

Enables LiteMage Cache for Magento Stores.

When set to 'On' the server will also try to use shared private cache information to speed up page load time for first time visitors. Select 'Safe' to disable this feature.

Syntax

Select from drop down list

Tips

This setting will not work if your LiteSpeed license does not have the LiteMage module enabled.

Cache Manager PathGo to top

Description

Specifies the directory used to store cache manager files. These files are stored in Storage Path by default.

Syntax

path

Tips

[performance] A separate location on a fast disk is recommended to prevent the accidental removal of cache manager files. Only set to a location on a RAM disk if cache storage is also saved on a RAM disk.

Public Storage Expire (minutes)Go to top

Description

The maximum age of a cached file before the server will attempt to physically remove it. This removal operation will occur once per day to prevent cache storage from growing too large. Minimum setting is 60 minutes.

Syntax

Integer number

Tips

Set this value to a time greater than your longest TTL to help prevent the removal of still valid cache files.

Enable Public CacheGo to top

Description

Specifies whether to turn on public cache for the current context, either at the server, virtual host, or context level.

Virtual hosts configured through Apache's httpd.conf can use the "CacheEnable" and "CacheDisable" directives at the server, virtual host, context, file, and location level or in .htaccess. "CacheEnable" and "CacheDisable" directives are compatible with Apache mod_cache directives. However, when used at the context, file, or location level, or in .htaccess, "CacheEnable" and "CacheDisable" will only be applied to directories below the current level. URL parameters will be ignored.

Syntax

Select from radio box

Tips

[Performance] It is not recommended to store large objects with low hit rates in cache. Doing so may result in high I/O wait and reduced overall server performance.

Check Public CacheGo to top

Description

Specifies whether to check against the public cache for URLs requested in the current context. Can be set at the server level, virtual host level, or context level.

Syntax

Select from radio box

Max Object SizeGo to top

Description

Specifies the maximum size of an object that can be stored in the cache directory. The default value is "10MB".

Syntax

Integer number

Cache Expire Time (seconds)Go to top

Description

Specifies how long an object will be cached. The default is "86400" seconds (one day).

Syntax

Integer number

Cache Stale Age (seconds)Go to top

Description

Specifies how long an object will continue to be served from cache after it has expired but before a new cached copy is available. The default is "10" seconds.

Syntax

Integer number

Cache Request with Query StringGo to top

Description

Specifies whether to cache a request with a query string in the URL. The default is "Yes". When a URL rewrite is involved, the server will check against the rewritten URL.

Syntax

Select from radio box

Cache Request with CookieGo to top

Description

Specifies whether to cache a request containing cookies. The default is "Yes".

Syntax

Select from radio box

Cache Response with CookieGo to top

Description

Specifies whether to cache a response containing cookies. The default is "Yes".

Syntax

Select from radio box

Ignore Request Cache-ControlGo to top

Description

Specifies whether to ignore Cache-Control request headers. The default is "No". If set to "Yes", the server may serve a cached object when "no-cache" has been set in Cache-Control.

Syntax

Select from radio box

Ignore Response Cache-ControlGo to top

Description

Specifies whether to ignore Cache-Control response headers. The default is "No". If set to "Yes", the response can be cached by the server even when "no-store" or "private" has been set in a Cache-Control header.

Syntax

Select from radio box

Enable Private CacheGo to top

Description

Specifies whether to turn on private cache for the current context, either at the server, virtual host, or directory level.

Private cache will cache a copy per user based on IP and cookies.
Virtual hosts configured through Apache's httpd.conf can use the "CacheEnable private /url" and "CacheDisable private /url" directives at server, virtual host, directory, file, and location levels or in a .htaccess file. "CacheEnable private" and "CacheDisable private" are compatible with Apache's mod_cache directives and will be applied to all directories below the current level. However, when used at the directory, file, or location level, or in a .htaccess file, "CacheEnable private" and "CacheDisable private" will only be applied to directories below the current level. URL parameters will be ignored.

Syntax

Select from radio box

Tips

[Performance] It is not recommended to store large objects with low hit rates in cache. Doing so may result in high I/O wait and reduced overall server performance.

Check Private CacheGo to top

Description

Specifies whether to check against the private cache for URLs requested in the current context. Can be set at the server, virtual host, or context level.

Syntax

Select from radio box

Private Cache Expire Time (seconds)Go to top

Description

Specifies how long an object will be cached in private cache. The default is "60" seconds.

Syntax

Integer number

Do-Not-Cache URLGo to top

Description

A list of URL segments where any URL containing these listed segments will not be cached. String matching is used. Regular expressions are not supported. Can be set at the server or virtual host level. URL segments listed at the server level are inherited by all virtual hosts and added to their Do-Not-Cache URL lists.

Tips

You can add comments by starting a line with "#".

No Cache DomainGo to top

Description

A comma-separated list of domains that will not be cached.

Syntax

Comma-separated list. Domain names are case insensitive and the leading "www." should be removed. The wildcard characters "*" and "?" are allowed. "?" only replaces one character. "*" replaces any number of characters. For example, "*.mydomain.com" will match all subdomains of mydomain.com. Duplicate domain names are not allowed.