Caching Like a Pro: Best strategies for dealing with Drupal cache
summary
Covers concrete Drupal 9 tools: use CacheableDependencyInterface and CacheableMetadata to collect and merge tags/contexts instead of hand-editing arrays, avoid breaking the render pipeline (don’t directly access child fields) or you lose invalidation, use lazy builders/BigPipe for asynchronous fragments, prefer cacheable JSON responses for GET endpoints, warm caches on deploy with hook_rebuild or cache_warmer, move high-traffic storage off the DB to a redis backend, and watch context/tag explosion and default bin limits (5,000) to prevent over-invalidation.
AI-written summary · about
chapters (17)
- 0:00Introduction to caching
- 1:44Why caching matters
- 5:59Caching layers in Drupal
- 8:36Cache tags vs cache contexts
- 10:57Cache API tools
- 15:30Render cache and rendering
- 19:51Avoiding render pipeline breaks
- 21:34Poor caching implementation
- 24:44Cache contexts complexity
- 27:10Custom cache contexts
- 28:45Lazy Builder concept
- 31:09Cache rebuild and warming
- 33:35Cache bins and performance
- 35:46Handling cache expiration
- 37:04Alternative caching backends
- 37:51When not to cache
- 39:10Q&A session
related talks
34mCaching in Drupal 8 has evolved: Tips on how to improve your code
01h 00mDrupal 8 Caching: A Developer’s Guide
43mCache Me Outside - Caching Methodologies & Architectures
27mCaching for Cash
26mCache Strategies with Best Practices
42mCaching for Cash
45mCaching: A trip down the rabbit hole
47mWeb Caching: Strategies, Pitfalls and Modern Tools
