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
litespeed_wiki:litespeed:cache [2014/07/15 18:22]
Michael Armstrong [How to enable LiteSpeed Cache]
litespeed_wiki:litespeed:cache [2017/01/03 19:56] (current)
Michael Alegre Added Redirect.
Line 1: Line 1:
-====== Introduction ======+~~REDIRECT>​litespeed_wiki:​cache:​lscache~~ 
 + 
 +====== ​LiteSpeed Cache (LSCache) ​Introduction ======
    
-LiteSpeed has made a built-in cache functionality (an advanced feature for Enterprise 2+CPU license) available ​since version 4.0 (March, 2009), ​and keeps improving throughout the later 4.0.x releases ​and 4.1RC releases. As of 4.1.1 (May, 2011), private cache support is added.+LiteSpeed has created ​a built-in cache functionality (an advanced feature for Enterprise 2+CPU license. Available ​since version 4.0 (March, 2009), ​its performance ​keeps improving throughout the later 4.0.x and 4.1RC releases. As of 4.1.1 (May, 2011), private cache support is added.
  
-LiteSpeed cache has similar ​features ​as Apache mod_cache but implemented in a more efficient way, and works like Varnish. It is an output cache for dynamic contents, so the usage does not limit to PHP pages. Unlike Varnish, ​it is built into LiteSpeed web server, eliminating one layer of reverse proxy. ​Hence more efficient ​for static contents. The uniqueness of LiteSpeed cache is that it uses rewrite rules (either in configuration files or .htaccess) to control its behavior for maximum flexibility. ​+LiteSpeed'​s ​cache features ​are very similar to those in Apache mod_cachebut implemented in a more efficient way. LiteSpeed cache works like Varnish. It is an output cache for dynamic contents, so the usage is not limited ​to PHP pages. Unlike Varnish, ​LiteSpeed cache is built into LiteSpeed'​s ​web server, ​thus eliminating one layer of reverse proxy. ​This translates into higher efficieny ​for static contents. The uniqueness of LiteSpeed cache is that it uses rewrite rules (either in configuration files or .htaccess) to control its behavior for maximum flexibility. ​
  
-A general way to enable LiteSpeed Cache through rewrite rules is to designate a signature token (such as cookie) in a page (or any pagein most cases to tell LSWS that cache can be enabled and TTL(Time To Live) of the cache freshness ​however ​acceptable. Generating ​cookie ​usually requires application code modification. ​Refer to [[http://​www.litespeedtech.com/​support/​forum/​showthread.php?​t=4679]] for example. It is worth noting that the cache function **SHOULD ONLY** be used for the pages that are **supposed to be cached or cache friendly**. Abuse use of this feature would result in performance degradation and/or other unexpectancies.+A general way to enable LiteSpeed Cache through rewrite rules is to designate a signature token (such as cookie) in any pagein most cases it will tell LSWS that cache can be enabled and that the TTL(Time To Live) of the cache freshness ​will remain ​acceptable. Generating ​cookies ​usually requires application code modification. ​Please refer to [[http://​www.litespeedtech.com/​support/​forum/​showthread.php?​t=4679]] for examples. It is worth noting that the cache function **SHOULD ONLY** be used for pages that are **supposed to be cached or cache friendly**. Abuse use of this feature would result in performance degradation and/or other unexpectancies.
  
-Since 4.1.1 (May, 2011), private cache support ​is added. Private cache is for caching resources for individual specifically instead of public shared. The purposes are:+Since 4.1.1 (May, 2011), private cache support ​has been added. Private cache is for caching resources for individual specifically instead of public shared. The purposes are:
   * maintain a persistent cache for applications that do not have a shared cache.   * maintain a persistent cache for applications that do not have a shared cache.
   * maintain a private persistent cache for specific groups of documents that are not to be shared among other applications.   * maintain a private persistent cache for specific groups of documents that are not to be shared among other applications.
Line 45: Line 47:
 ====== How to enable LiteSpeed Cache ====== ====== How to enable LiteSpeed Cache ======
  
-Here are the steps to enable LSWS built-in cache:+Although there is a advanced setting [[http://​litespeedtech.com/​docs/​webserver/​config/​cache#​cachePolicy:​enableCache|"​Enable Cache"​]] ​ in LSWS Wed Admin Console on both server and virtual host level, "​No"​ is always recommended since globally enabled public cache may cause problem when URLs change or other changes on the domain. We recommend to enable cache through rewrite rules. ​Here are the steps to enable LSWS built-in cache:
  
 **1. Enable cache function at Server level in LSWS** **1. Enable cache function at Server level in LSWS**
  • Admin
  • Last modified: 2014/07/15 18:22
  • by Michael Armstrong