2.13.5.11. Setting up LiteSpeed Cache in Drupal 8

  1. Change web server for the desired site on OpenLiteSpeed.
  2. Add to file .htaccess such a block of directives:
    <IfModule LiteSpeed>
      CacheLookup on
    </IfModule>
  3. Openup module page on GitHub and copy the link "Source code (tar.gz)" (not zip):
  4. Install the module:
    1. Go to address http://your_website.com/admin/modules/install.
    2. In field "Install with URL-addresses" paste the copied link to the archive with the module.
    3. Clickon "Set".
  5. Enable the module:
    1. Go to address http://your_website.com/admin/modules.
    2. In the list of extensions, find the module LiteSpeed Cache.
    3. Check the module.
    4. Clickon "Set".
  6. Configure the module:
    1. Go to address http://your_site.com/admin/config/development/lscache.
    2. Parameter value "ESI" install in "Off".
    3. Clickon "Save configuration".
  7. Check the site is working.

After completing the described actions, caching will work automatically.

LiteSpeed Cache module settings are available at http://your_site.com/admin/config/development/lscache.

Block "CLEAR CACHE!":

  • "Clear this site" — button to clear the LiteSpeed cache of the current site on this virtual host. It can be useful when several sites are hosted on the same host.
  • "Clear all" — button to clear LiteSpeed cache for all sites hosted on the current virtual host.

Block "LSCACHE SETTINGS!":

  • "Cache Status" — enable / disable LiteSpeed cache.
  • "Debugging" — enable / disable debug mode. When enabled, LiteSpeed cache will provide additional headers that may be useful during website development or deployment.
  • "ESI" — enable / disable ESI support. Should be disabled because the hosting uses OpenLiteSpeed.
  • "Maximum age" — time of storing pages in the public cache LiteSpeed.
  • "Max age private" — time of storing pages in the private cache LiteSpeed.
Content