Drupal 8 Caching: A Developer’s Guide
summary
Drupal 8 caching spans layers from MySQL query cache and PHP OPCache through Redis or memcached object caching, Drupal’s internal dynamic page cache and BigPipe, to Varnish, CDNs (Akamai/Fastly/CloudFlare) and browser caches. Key mechanics: HTTP headers (Cache-Control, ETag, Age), Surrogate Keys / cache tags in render arrays that let Varnish/CDNs invalidate precisely, and Varnish default 120s which surprises people. Common failures: cookies block caching, Drupal’s internal cache can return stale pages even after Varnish purge, and timeouts usually indicate slow origin queries rather than Varnish itself.
AI-written summary · about
chapters (17)
- 0:00Start
- 3:37Ajax
- 7:54Php Caching
- 8:23Object Caching
- 9:37Dynamic Cache Modules
- 26:20Alternative Php Cache
- 28:08Headers
- 30:52Caching Contexts and Tags
- 31:03Render Array
- 33:33Surrogate Keys
- 35:34Varnish
- 37:10Varnish Cache
- 38:11Default Varnish Settings
- 43:13Reasons Why Things Will Not Get Cached by Varnish
- 44:36Etags and Last Modified
- 51:55Drupal 8 Caching
- 52:33Cache Context
related talks
34mCaching in Drupal 8 has evolved: Tips on how to improve your code
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
43mCache Me Outside - Caching Methodologies & Architectures
53mSuccess at scale: Preparing Drupal 8 for large events
25mCaching strategies on https://dev.to
01h 04mCaching Best Practices
46mVarnish for PHP developers
58mCaching the uncacheable: delivering personalized experiences without sacrificing performance
