Q: How does the system cache pages?
A: Exponential has several cache layers. From the outside in:
- Velocity response cache: when Exponential Velocity serves the site, it answers repeated requests for anonymous pages itself, without PHP or the database. On by default (velocity.ini [CacheSettings] Enabled=enabled, pages kept 30 seconds by DefaultTtl). Signed-in visitors are never served from it.
- Role-aware HTTP cache: stores whole pages per permission context, for anonymous and signed-in visitors. Off until you switch it on (httpcache.ini [HttpCacheSettings] Enabled).
- Static cache: public pages stored as plain files that the web server sends without PHP. Off by default (site.ini [ContentSettings] StaticCache=disabled); ./console exp:cache static regenerate generates the files.
- Content view cache: the rendered content of each page, per language and role. On by default (site.ini [ContentSettings] ViewCaching=enabled).
- Template-block cache: parts of the page layout, such as menus, cached with {cache-block} in the templates. On by default.
- SQL query cache: answers to repeated database reads. Off by default (querycache.ini [QueryCacheSettings] Mode=off).
- OPcache and APCu: the PHP caches of compiled code and small values.
A CDN or a caching proxy can sit in front of the site; it is not part of Exponential.
Clear caches in the administration under Setup > Cache management, or from the shell with ./console exp:cache (for example exp:cache status, exp:cache content, exp:cache velocity clear) or php bin/php/ezcache.php (for example --clear-id=content or --clear-tag=template). Caching layers describes every layer, and Caches explains the cache page and the commands.
Contributors
- Graham Brookins Updated Maintainer
Comments
Add a comment