### LiteSpeed Web Server Users' Manual

##### Version 5.0 Rev. 1

- License Std / Ent
- Introduction
- Installation
- Administration
  - Service Manager
- Security
- Configuration
  - Server General
  - Server Tuning
  - Server Security
  - Request Filter
  - Page Cache
  - External Apps
  - Fast CGI App
  - Fast CGI Authorizer
  - LSAPI App
  - Servlet Engine
  - Web Server
  - Pipped logger
  - Load Balancer
  - Script Handler
  - Rack/Rails Settings
  - Listeners
  - Templates
  - Virtual Host Basic
  - Virtual Host General
  - Virtual Host Security
  - Rewrite
  - Context
  - Static Context
  - Java Web App Context
  - Servlet Context
  - Fast CGI Context
  - LSAPI Context
  - Proxy Context
  - CGI Context
  - Load Balancer Context
  - Redirect Context
  - Rack/Rails Context
  - Web Socket Proxy
  - Add-ons
  - Admin Server
  - Admin Listeners

# Page Cache Settings

#### Table of Contents

Storage Path
Description: Specifies the directory for holding cached objects. Currently, LiteSpeed Cache stores each object in its own file. The file name 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 in order to enable cache.
Syntax: path
Tips: [performance] Assign a dedicated disk or disk array as the cache storage. RAID0 is recommended.

Enable Public Cache
Description: Specifies whether to turn on public cache for the current context, either at the server level, virtual host level, or context level. Virtual hosts configured through Apache 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 a .htaccess, "CacheEnable" and "CacheDisable" will only be applied to all 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 the cache. This may result in high I/O wait and reduce overall server performance.

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

Max Object Size
Description: Specifies the maximum size of an object that can be stored in the cache directory. The default value is "128KB".
Syntax: Integer number
Tips: [Performance] It is not recommended to store large objects with low hit rates in the cache. This may result in high I/O wait and reduce overall server performance.

Cache Expire Time (seconds)
Description: Specifies how long an object will be cached. The default is "86400" seconds (one day).
Syntax: Integer number

Cache Stale Age (seconds)
Description: Specifies how long an object will continue to be served after its cache has expired but bbefore the new cache is available. The default is "10" seconds.
Syntax: Integer number

Cache Request with Query String
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 Cookie
Description: Specifies whether to cache a request containing cookies. The default is "Yes".
Syntax: Select from radio box

Cache Response with Cookie
Description: Specifies whether to cache a response containing cookies. The default is "Yes".
Syntax: Select from radio box

Ignore Request Cache-Control
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-Control
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", "private" has been set in a Cache-Control header.
Syntax: Select from radio box

Enable Private Cache
Description: Specifies whether to turn on private cache for the current context, either at server level, virtual host level, or directory level. Private cache will cache a copy per user based on IP and cookies. Virtual hosts configured through Apache httpd.conf can use the "CacheEnable private /url" and "CacheDisable private /url" directives at server, virtual host, directory, files, 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, and location level or in a .htaccess file, "CacheEnable private" and "CacheDisable private" will be applied to all 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 the cache. This may result in high I/O wait and reduce overall server performance.

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 level, virtual host level, or context level.
Syntax: Select from radio box

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

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.