Skip to content

LSCWP page cache settings: what each option controls

A field-by-field breakdown of every LiteSpeed Cache page cache option — what it does, the header it emits, and when to change the default.

The LSCWP Cache settings panel has around twenty options and they interact in non-obvious ways. Turning on the wrong combination produces either over-caching (logged-in users see each other’s data) or under-caching (every request misses despite a working LiteSpeed install). This reference breaks down each option in the Cache tab, the header it influences, and the safe default for production.

How to verify

Check what cache directives a URL is receiving right now:

# First load — expect miss
curl -sI https://example.com | grep -iE 'x-litespeed-cache|cache-control|vary'

# Second load — expect hit
curl -sI https://example.com | grep -i x-litespeed-cache

# Check the raw ESI/Vary response from LSCWP
wp option get litespeed.conf.cache-ttl
wp option get litespeed.conf.cache-logged-in
wp option get litespeed.conf.cache-commenters

To list all LSCWP option keys at once:

wp option list --search="litespeed.conf.*" --format=table

What’s happening

LSCWP communicates with the LiteSpeed server through X-LiteSpeed-Cache-Control response headers set during WordPress’s output phase. When a page is uncached, LSCWP decides — based on its settings and the current request context — whether to emit a public cache instruction, a private one, or a no-cache directive. The server reads that header and either stores the response in its shared cache (public), stores it in a per-user partition (private), or passes it through without caching.

TTL is communicated via max-age in the same header. Vary keys (mobile, currency, role) determine how many separate cached variants exist per URL. More Vary keys mean more cache entries and a higher purge cost when content changes.

The procedure

The following covers every option in the Cache tab of LSCWP as of version 6.x, in panel order.

Enable Cache Master switch. Without this, LSCWP emits no cache headers. Default: On.

Enable Cache for Guests Only When On, only requests that arrive without a WordPress session cookie get a public cache response. Logged-in users always get uncached PHP. This is the safest option for membership or WooCommerce sites where logged-in state affects page content. Default: On is the safer choice; some simple blogs can disable it.

Cache Logged-in Users Stores a separate cached copy per logged-in user. Useful for high-traffic dashboards where many users see identical content after login. Not safe if user profiles or pricing are personalised per account. Requires setting a Login Cookie so LiteSpeed can partition correctly. Default: Off.

Login Cookie The name of the cookie that indicates a logged-in session. WordPress uses wordpress_logged_in_*. Enter the prefix without the hash suffix. Required when Cache Logged-in Users is On, otherwise LSCWP cannot create user-specific partitions. Example value: wordpress_logged_in.

Cache Commenters Caches pages for users who have left a comment (WordPress sets a comment_author_* cookie). Usually safe to leave Off — comment authors are a tiny fraction of traffic and their sessions have no special content requirements. Default: Off.

Cache REST API Stores REST API responses. Safe to enable if your REST endpoints are public and the responses do not vary by authentication. Disable if clients send auth tokens or if endpoints return personalised data. Default: Off on most setups.

Cache Login Page Caches wp-login.php. Enabling this reduces PHP load on shared login pages but can interfere with nonce validation. Recommended Off for sites where login frequency is low. Default: Off.

Cache favicon.ico Caches the favicon at favicon.ico. Harmless to enable; the file almost never changes. Default: On.

Cache PHP Resources Caches .php files referenced directly (not through WordPress routing). Rarely needed; enable only if you have static PHP-generated resources like captcha images that are safe to cache. Default: Off.

Mobile Cache Stores a separate cache variant for mobile user agents. Enable when your theme serves different HTML to mobile (AMP, separate mobile theme). If your theme is responsive and sends identical HTML to all devices, this only multiplies cache entries without benefit. Default: Off for responsive themes.

Mobile User Agents The list of strings that trigger the mobile cache partition. Relevant only if Mobile Cache is On. The default list covers common mobile browser user agents; extend it if you serve a native app with a custom user agent.

Cache TTL Maximum age in seconds before a cached page is considered stale and re-fetched from PHP. 604800 (7 days) is a reasonable ceiling for pages that are purged on save. Drop to 86400 for fast-changing content. Very high TTLs (2592000 / 30 days) require reliable purge hooks on every content change event. Default: 604800.

Private Cache TTL TTL for private (logged-in user) cache partitions. Can be shorter than the public TTL since private pages are more likely to change per interaction. Default: 1800 (30 minutes).

Front Page TTL Override TTL for the front page. The front page is often updated more frequently than inner pages and benefits from a shorter TTL if the crawler is not warming it. Default: 1800.

Home Page TTL TTL for the blog index (/). If the front page and home page are the same URL, this option is redundant.

Feed TTL TTL for RSS/Atom feeds. Feeds are useful to cache — they are high-traffic and generated from the same post data. 3600 (1 hour) is a practical value. Default: 3600.

Tag / Category / Archive TTL TTL for taxonomy and date archives. These pages change whenever a post in the archive is updated or published. The crawler should handle re-warming; a TTL of 86400 with a crawler enabled is safe. Default: 86400.

Common pitfalls

X-LiteSpeed-Cache: miss on every request. Check that Enable Cache is On, then check for a Set-Cookie header in the response — any uncacheable cookie sent before the cache check bypasses caching regardless of settings.

Private cache serving shared content. Cache Logged-in Users is On but Login Cookie is not set. LiteSpeed treats all logged-in users as one partition instead of separate ones, and the first logged-in user’s page is served to all subsequent logged-in users.

Mobile Vary creating excessive cache size. Mobile Cache is On for a responsive theme. Every URL has two stored variants; purge operations double in cost. Disable Mobile Cache and let the CDN or browser handle responsive layout.

Short TTL on a site without a crawler. A 3600 TTL with no crawler means every hour all your traffic hits PHP until the crawler re-warms the cache. Either extend the TTL or enable the crawler.

REST API cache returning stale personalised data. Cache REST API is On and an endpoint includes user-specific data in its JSON. The first authenticated request populates the cache and subsequent users receive someone else’s data. Disable REST API caching or add the endpoint to the exclusion list.


Understanding every option in the cache settings panel is the first step to a correct LSCWP deployment. Stack Harbor configures and audits LSCWP settings as part of managed operations — if a cache audit or misconfiguration investigation is what you need, that is the right starting point.