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
| Setting | Applies to | Typical value |
|---|---|---|
| Default Public Cache TTL | Pages for visitors who are not logged in | 604800 (1 week) |
| Default Private Cache TTL | Per-user cached pages for logged-in users | 1800 (30 minutes) |
| Default Front Page TTL | The home page | 604800, or shorter if it shows changing content |
| Default Feed TTL | RSS feeds | 0 (no cache) or a short value |
| Default REST TTL | Cacheable REST API responses | 604800 |
| Default HTTP Status Code Page TTL | 404 and other error pages | 3600 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.
Related settings
- 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.
