TYPO3 Frontend Page Caching Decision Guide
Guide to choosing and validating TYPO3 frontend page caching options, comparing native TypoScript cache, external reverse proxies, and Fluid partial caching with configuration examples and verification steps.
06 Jul 2025, 15:12 UTC

Decision: Select a Frontend Page Caching approach in TYPO3
State the decision and constraints, then compare the supported options.
Constraints
- TYPO3 version 9 LTS or newer (features described apply to 9, 10 LTS and later).
- Need to serve pages quickly while keeping dynamic content consistent.
- Ability to purge caches after content changes via the TYPO3 backend or CLI.
Supported caching options
| Option | Where configured | Typical use case | Main advantage | Main trade‑off |
|---|---|---|---|---|
Native page caching via TypoScript cacheConfig | TypoScript template (setup) | Sites that can rely on TYPO3’s built‑in frontend cache | No extra software; cache tags invalidate automatically | Write‑heavy extensions may see overhead from tag invalidation |
| External reverse proxy (Varnish/NGINX) | Web server layer | Static‑heavy sites with high traffic | Higher throughput, off‑loads TYPO3 | Requires coordinated purge via cache_clear_all API |
| Fluid template partial caching | Fluid view helpers (f:cache) | Frequently used, slowly changing snippets | Granular control, reduces rendering of parts | Does not replace full‑page cache; needs its own lifetime handling |
Trade‑offs summary
- Native TypoScript cache is simplest to set up and works out‑of‑the‑box for most installations. It adds tag‑based invalidation, which can increase DB load when large Extbase result sets are cached.
- External reverse proxy gives the best raw performance but introduces an extra operational layer; you must ensure every content change triggers a proxy purge, otherwise stale HTML may be served.
- Fluid partial caching complements the other two methods; it is ideal for components like navigation menus or sidebars that change infrequently but are rendered on every page.
Implementation example: enabling native page caching with cache tags
The following TypoScript snippet activates the frontend page cache, defines a lifetime of one hour, and attaches a custom tag my_ext to allow targeted flushes after data changes in a custom extension.
# TypoScript setup (page TSconfig or setup.txt)
config {
# Enable frontend caching
cache = 1
# Lifetime in seconds (3600 = 1 hour)
cache_lifetime = 3600
# Use the default frontend cache backend (usually database or file)
cache_backend = file
# Define cache tags for this page type
cacheTags = my_ext
}
Place the snippet in the TypoScript template that applies to the relevant page tree. After saving, clear the TYPO3 cache to activate the new configuration:
# Run as a user with sufficient permissions (typically the web‑server user or a sudo‑enabled admin)
typo3cms cache:flush --all
Validation steps
- Load a page in the browser and inspect the response headers. Look for
X-TYPO3-Cache: hitormissto confirm the cache is active. - Run
typo3cms cache:flush --allagain, then reload the page; the header should showmissfollowed byhiton subsequent requests. - To verify that the custom tag is registered, execute:
typo3cms cache:list
The output should list a cache entry whose tags include my_ext. If the tag is missing, double‑check the TypoScript cacheTags line and clear the cache again.
Limitations and practical checks
- In TYPO3 10 LTS the way TypoScript settings are merged changed; an explicit
clearCachecommand may be required after editing the setup to avoid stale configuration. - If the site has frontend user authentication, ensure
config.disableAllHeaderCode = 0and that noFE_USERdata is cached inadvertently; otherwise sensitive information could be exposed via the public cache. - Third‑party extensions can hook into the caching system and override or add tags. After installing or updating such extensions, run
typo3cms cache:flush --alland re‑check theX-TYPO3-Cacheheader to confirm behavior.
Rollback
Because the change only modifies TypoScript configuration, reverting is done by removing or commenting out the snippet and flushing the cache again:
# Remove the config block from TypoScript
typo3cms cache:flush --all
No database schema or file system changes are made, so the rollback is safe and immediate.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.