LiteSpeed Cache (LSCache)
This project integrates LiteSpeed Cache with Drupal, adding necessary response headers for caching Drupal pages based on cache tags. It also includes a submodule to invalidate LiteSpeed Cache entries when content is updated, with options for advanced invalidation strategies and per-user caching.
Drupal.org-native integration for LiteSpeed Cache. Adds the response headers LSCache needs to cache Drupal pages keyed by Drupal cache tag, and ships a Purge-framework submodule that invalidates LSCache entries when content changes. Stable (1.3.x), security-advisory covered.
Invalidation that works on real LiteSpeed builds
Some LiteSpeed builds silently ignore tag-based PURGE: the request returns HTTP 200 but evicts nothing, so edits never clear. The purger supports a per-URL PURGE strategy (purge_strategy: auto|tag|url) that resolves each cache tag to its canonical Drupal paths and sends one PURGE per URL; auto self-selects from a probe.
drush lscache:diagprobes the connected LiteSpeed instance for URL- versus tag-PURGE effectiveness and prints a recommendation.- A self-populating tag-affinity table plus an operator-pinnable
static_url_mapresolve aggregate tags (node_list, View configs) to the listing pages that carry them.drush lscache:list-tag-coveragereports gaps.
More
- Optional per-user (private) caching that is BigPipe and drupalSettings aware, so it does not break Drupal AJAX for logged-in users.
- Vary cookies, ESI fragments for per-user chunks inside shared pages, and status-report diagnostics for the required
.htaccessdirectives, the PURGE host, and scheme or Host-header mismatches. - Requires Drupal
^10.3 || ^11under LiteSpeed Web Server, OpenLiteSpeed, or a LiteSpeed PaaS host. The Purger submodule requires Purge.