Page Cache Settings
Table of Contents
Cache Features | Storage Path | Enable LiteMage | Cache Manager Path | Public Storage Expire (minutes)
Check Public Cache | Check Private Cache | Respect Cacheable | Max Object Size | Cache Stale Age (seconds) | Cache Key Modifications | Publicly Cache All | Cache Expire Time (seconds) | Privately Cache All | Private Cache Expire Time (seconds) | Micro Cache 5XX Response
Cache Features⇑
Description
Specifies which cache features to enable. On enables the cache engine while Crawler and ESI enables those respective features. Features enabled globally at the Server level can be overriden at the Virtual Host level.
Setting Enable LiteMage to On at the Virtual Host level will override this setting, enabling all features.
Default value: Everything enabled
Syntax
Select from checkbox
Storage Path⇑
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
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 LiteMage⇑
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 Path⇑
Description
Specifies the directory used to store cache manager files. These files are stored in Storage Path by default.
Syntax
path
Tips
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)⇑
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.
Check Public Cache⇑
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
Check Private Cache⇑
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
Respect Cacheable⇑
Description
Respect the value of regular "Cache-Control" response headers when LiteSpeed-specific cache control has not been provided.
LiteSpeed-specific cache control includes the X-litespeed-cache-control response header and the cache-control environment variable set via rewrite rule.
Syntax
Select from radio box
Tips
This setting is enabled by default.
Max Object Size⇑
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 Stale Age (seconds)⇑
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 Key Modifications⇑
Description
Makes some requests more cache-friendly by allowing junk query string parameters to be dropped from URLs.
Syntax
clear discards all previous configurations, -qs:[string] drop all query strings where the name matches [string] exactly, or -qs:utm* drop all query strings where the name part starts with [string]. Input one rule per line.
Example
-qs:gclid drops all query strings where the name matches "gclid" exactly.
Publicly Cache All⇑
Description
Publicly cache all URLs served under the current context (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
Disabled by default. Do not enabled this setting if you are using any LSCache plugins.
Cache Expire Time (seconds)⇑
Description
Specifies how long an object will be cached. The default is "86400" seconds (one day).
Syntax
Integer number
Privately Cache All⇑
Description
Privately cache all URLs served under the current context (server, virtual host, or context level).
A separate cached copy will be made per user based on their IP and set 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
Disabled by default. Do not enabled this setting if you are using any LSCache plugins.
Private Cache Expire Time (seconds)⇑
Description
Specifies how long an object will be cached in private cache. The default is "60" seconds.
Syntax
Integer number
Micro Cache 5XX Response⇑
Description
Cache pages responding with HTTP status code 5xx (500, 503, etc) for 10 seconds when the cache response header indicates that the page is cacheable.
Default values:
Server level: Yes
VH level: Inherit Server level setting
Context-level Inherit VH level setting
Syntax
Select from radio box
Tips
Enabling this setting is useful for avoiding bad requests but can also act as some added DDoS protection.
Do-Not-Cache URL⇑
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 Domain⇑
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.