LiteSpeed

LiteSpeed Cache TTL settings explained: how long pages stay cached

Understand the TTL tab in LiteSpeed Cache: default public, private, front page, feed and REST TTLs, how they interact with automatic purging, and sensible values.

IntermediateWordPress on LiteSpeed2 min read

TTL (time to live) is how long LiteSpeed keeps a cached page before rebuilding it. Because LiteSpeed Cache purges pages automatically when you edit content, TTLs can be long. They mainly matter for content that changes without an edit in WordPress.

Before you start

LiteSpeed Cache installed (see configuring LiteSpeed Cache). Settings are in LiteSpeed Cache → Cache → TTL.

The TTL settings

SettingApplies toTypical value
Default Public Cache TTLPages for visitors who are not logged in604800 (1 week)
Default Private Cache TTLPer-user cached pages for logged-in users1800 (30 minutes)
Default Front Page TTLThe home page604800, or shorter if it shows changing content
Default Feed TTLRSS feeds0 (no cache) or a short value
Default REST TTLCacheable REST API responses604800
Default HTTP Status Code Page TTL404 and other error pages3600 for 404

Why long TTLs are safe

  • Editing a post purges that post, its categories, tags and the home page automatically.
  • Theme and plugin updates trigger a full purge if Purge All On Upgrade is on.
  • So a long TTL means fewer rebuilds and faster pages, without stale content.

When to shorten TTLs

  • Pages showing content from outside WordPress, such as stock levels updated by a feed, or "latest tweets".
  • Pages with date-based content, such as event lists.
  • Instead of shortening the global TTL, use Scheduled Purge for specific pages (see scheduled purges).

Tip: If you change the TTL, click Purge All afterwards. Pages already cached keep their old expiry until they are purged.

404 pages

Caching 404 pages for an hour protects the server from bots requesting random URLs. If you create new pages often at URLs that previously returned 404, purge after publishing.

Check a page's cache status

Use the response headers in DevTools: x-litespeed-cache: hit means it came from cache. See checking the cache header.

  • Logged-in user caching and ESI: ESI explained.
  • Browser cache for static files is separate: Cache → Browser sets how long browsers keep images, CSS and JS.

Frequently asked questions

Does a long TTL affect SEO?

No. Search engines see fresh content because pages are purged on edits; faster responses help.

What is the minimum TTL?

Values below 30 seconds are rarely useful; if a page must always be fresh, exclude it from cache.

Is browser cache TTL the same?

No. Browser cache controls how long visitors' browsers keep static files, not how long LiteSpeed keeps pages.

Why does the private TTL need to be shorter?

Private cache holds per-user pages for logged-in visitors. Shorter TTLs keep personal content fresh and limit storage use.

Should feeds be cached?

Feed readers poll often. A short TTL reduces load; 0 is simplest if feeds must always be current.

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.