LiteSpeed Cache For PrestaShop

LiteSpeed Cache for PrestaShop (LSCPS) communicates directly with your installation of LiteSpeed Web Server to save and serve static copies of dynamic web pages, greatly reducing your shop’s page-load time.

This wiki will guide you through the all steps needed to install and set up LSCPS.

LSCPS Features

  • Support for PrestaShop 1.6+
  • Integrated into both LiteSpeed Web Server and LiteSpeed Web ADC. Works in a single-server environment using LSWS, or a clustered environment using LS Web ADC.
  • Caching is highly customizable on both a global level and a per-store basis. Tag-based caching allows purge by tag from external programs.
  • Main page and public blocks are cached once and served to all users. Private blocks are cached per-users and served only to that user.
  • LSCPS automatically caches the following pages with a GET request (including AJAX GET): Home, Categories, Products, CMS, New products, Best sales, Suppliers, Manufacturers, Prices drop, Sitemap.
  • User information can be cached privately via ESI blocks and auto purged when the information changes. Support for cart and account sign in are built in. Other third-party modules that contain private information can be easily added.
  • Updates in the shop admin area automatically trigger a purge of any related pages in the cache.
  • New client orders automatically trigger a purge of related product and catalog pages based on stock status or quantity (configurable).
  • If a page contains products with specific prices, TTL will be auto adjusted based on special price effective dates.
  • The cache can be manually flushed from within the PrestaShop admin.
  • LSCPS supports multiple stores, multi-language, multi-currency and geolocation.
  • An optional cache crawler script is available to traverse your PrestaShop store and warm up the cache.

Installing LSCPS

Please follow these instructions to install & enable the LSCache module for PrestaShop.

Customizing LSCPS

Certain PrestaShop widgets and features require further customization before they can be used with LSCPS. Please see the appropriate customization page for details:

Testing LSCPS

To determine whether a page is being served from LSCSP, do the following:

  1. Navigate to your site, and open your browser's developer tools.
  2. Click on the Network tab in the inspector.
  3. Refresh the page.
  4. In another tab, navigate to the cache manager and purge your cache.
  5. Go back to the previous tab, reload the page and click the first resource listed in the inspector. This should be an HTML file, and might look like http://example.com or /.
  6. You should see X-LiteSpeed-Cache: miss and something like X-LiteSpeed-Cache-Control:public,max-age=1800 and X-LiteSpeed-Tag:F,B.1. These mean LSCache is active and the current page will be cached for the next visitor.
  7. If you reload page a second time, you should see X-LiteSpeed-Cache: hit to indicate the page is being served by the cache and LSCPS is configured correctly.

Note: If your first refresh after purging returns X-LiteSpeed-Cache: hit in the response header, this may be because someone visited the page after you purged but before you refreshed it yourself.

Support

Need more help? Here are a few options:

The LiteSpeed Cache extension is released under the GNU General Public Licence (GPL). See our website for more information.

 
litespeed_wiki/cache/lscps.txt · Last modified: 2018/07/31 12:10 by Lisa Clarke