Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:cache:developer_guide:directives [2016/05/16 17:29]
Rob Holda [CacheRoot]
litespeed_wiki:cache:developer_guide:directives [2017/03/01 19:20]
Kevin Fwu [Apache configuration directives]
Line 1: Line 1:
 ====== Apache configuration directives ====== ====== Apache configuration directives ======
-LiteSpeed’s Apache-style configuration directives must be nested in ''<​IfModule LiteSpeed>''​ and ''</​IfModule>''​ tags. For example:+LiteSpeed’s Apache-style configuration directives must be nested in ''<​IfModule LiteSpeed>''​ and ''</​IfModule>''​ tags. This is to prevent any possible incompatibility issues. For example:
  
 <​code>​ <​code>​
 <​IfModule LiteSpeed> ​ <​IfModule LiteSpeed> ​
  ​CacheEnable public /  ​CacheEnable public /
- ​CacheRoot ​c:/cacheroot+ ​CacheRoot ​/dev/shm/cacheroot
  ​CacheMaxExpire 604800  ​CacheMaxExpire 604800
 </​IfModule>​ </​IfModule>​
Line 38: Line 38:
 The ''​CacheRoot''​ directive defines the name of the directory on the disk to contain cache files. \\ The ''​CacheRoot''​ directive defines the name of the directory on the disk to contain cache files. \\
 <​code>​ <​code>​
-CacheRoot ​c:/cacheroot+CacheRoot ​/dev/shm/cacheroot
 </​code>​ </​code>​
  
Line 44: Line 44:
 **syntax:** ''​CacheMaxFileSize bytes''​ \\ \\ **syntax:** ''​CacheMaxFileSize bytes''​ \\ \\
 The ''​CacheMaxFileSize''​ directive sets the maximum size, in bytes, for an object to be considered for storage in the cache. \\ The ''​CacheMaxFileSize''​ directive sets the maximum size, in bytes, for an object to be considered for storage in the cache. \\
-''​CacheMaxFileSize 64000''​+<​code>​ 
 +CacheMaxFileSize 64000 
 +</​code>​
  
 ===== CacheIgnoreCacheControl ===== ===== CacheIgnoreCacheControl =====
 **syntax:** ''​CacheIgnoreCacheControl On|Off''​ \\ \\ **syntax:** ''​CacheIgnoreCacheControl On|Off''​ \\ \\
 Ordinarily, requests containing a ''​Cache-Control:​ no-cache''​ or ''​Pragma:​ no-cache''​ header value will not be served from the cache. The ''​CacheIgnoreCacheControl''​ directive allows this behavior to be overridden. ''​CacheIgnoreCacheControl On''​ tells the server to attempt to serve the resource from the cache even if the request contains no-cache header values. Resources requiring authorization will //never// be cached. \\ Ordinarily, requests containing a ''​Cache-Control:​ no-cache''​ or ''​Pragma:​ no-cache''​ header value will not be served from the cache. The ''​CacheIgnoreCacheControl''​ directive allows this behavior to be overridden. ''​CacheIgnoreCacheControl On''​ tells the server to attempt to serve the resource from the cache even if the request contains no-cache header values. Resources requiring authorization will //never// be cached. \\
-''​CacheIgnoreCacheControl On''​ \\+<​code>​ 
 +CacheIgnoreCacheControl On 
 +</​code>​
  
 <​code>​ <​code>​
Line 60: Line 64:
 **syntax:** ''​CacheMaxExpire seconds''​ \\ \\ **syntax:** ''​CacheMaxExpire seconds''​ \\ \\
 The ''​CacheMaxExpire''​ directive specifies the maximum number of seconds for which cacheable HTTP documents will be retained without checking the origin server. Thus, documents will be out of date at most this number of seconds. This maximum value is enforced even if an expiry date was supplied with the document. \\ The ''​CacheMaxExpire''​ directive specifies the maximum number of seconds for which cacheable HTTP documents will be retained without checking the origin server. Thus, documents will be out of date at most this number of seconds. This maximum value is enforced even if an expiry date was supplied with the document. \\
-''​CacheMaxExpire 604800''​+<​code>​ 
 +CacheMaxExpire 604800 
 +</​code>​
  
 ===== CacheLookup ===== ===== CacheLookup =====
 **syntax:** ''​CacheLookup public on|off''​ \\ \\ **syntax:** ''​CacheLookup public on|off''​ \\ \\
 The ''​CacheLookup''​ directive instructs LiteSpeed Web Server on whether or not to check public cache. Typically, on a web server level, you want to set this off with the following directive: \\ The ''​CacheLookup''​ directive instructs LiteSpeed Web Server on whether or not to check public cache. Typically, on a web server level, you want to set this off with the following directive: \\
-''​CacheLookup public off''​ \\ \\+<​code>​ 
 +CacheLookup public off 
 +</​code>​  
 And then turn it on at a per-site basis with the following directive: \\ And then turn it on at a per-site basis with the following directive: \\
  
-''​CacheLookup public on''​ \\ \\ +<​code>​ 
 +CacheLookup public on 
 +</​code>​
  • Admin
  • Last modified: 2020/07/31 19:37
  • by Lisa Clarke