X-LiteSpeed-Cache

The HTTP X-LiteSpeed-Cache response header is an unofficial HTTP header indicating the Caching status of a response served through the LiteSpeed Web Server built-in cache engine.

Note

The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.

Usage

LiteSpeed Web Server includes a server-level page cache called LSCache. When LSCache is enabled, the server adds the X-LiteSpeed-Cache header to every response, reporting whether the content was served from cache, fetched fresh from the backend, or handled by a specialized cache layer like LiteMage. The header provides a quick way to verify caching is active and working as expected on LiteSpeed-powered sites.

LSCache operates at the server level, meaning the caching decision happens before the application framework processes the request. This makes LSCache faster than application-level caching plugins alone. The header value reflects the outcome of the server-level cache lookup.

Values

hit

The hit value means the response was found in the LSCache store and served directly without executing the backend application. This is the optimal outcome for cached pages.

miss

The miss value means the response was not found in cache. The request was forwarded to the backend application, and the response has been stored in cache for future requests.

bkd

The bkd value stands for "backend." The response was served by the backend application and is not eligible for caching at the LSCache layer. This appears for requests LSCache does not cache, such as POST requests or responses with cache-inhibiting headers from the application.

hit,litemage

The hit,litemage value means the response was served from LiteMage, a full-page cache module built for Magento stores running on LiteSpeed. LiteMage handles Magento-specific cache logic like hole-punching for dynamic blocks while still serving the full page from cache.

Example

A hit means the page was served directly from the LSCache store without reaching the backend application. This is the fastest response path on a LiteSpeed server.

X-LiteSpeed-Cache: hit

A miss means the page was not in cache. The backend application generated the response, and LSCache stored a copy for subsequent requests. A follow-up request for the same resource typically returns a hit.

X-LiteSpeed-Cache: miss

A bkd means the response came from the backend and was not cached. This is expected for dynamic or uncacheable requests like form submissions or authenticated pages.

X-LiteSpeed-Cache: bkd

On a Magento store running LiteMage, the combined value confirms the full-page cache handled the response. The presence of both hit and litemage distinguishes LiteMage cache hits from standard LSCache hits.

X-LiteSpeed-Cache: hit,litemage

Takeaway

The X-LiteSpeed-Cache response header reports the caching outcome for requests handled by LiteSpeed Web Server's built-in LSCache engine. The values cover cache hits, misses, uncacheable backend responses, and specialized Magento full-page caching through LiteMage.

See also

Last updated: March 6, 2026