Caching in Drupal 8 has evolved: Tips on how to improve your code
summary
Core gains a faster in-memory layer — memory cache — that skips serialization and sits in front of persistent bins via the backend chain so expensive calculations hit RAM first and fall back to durable storage. Render work moves toward smaller, independently cached pieces to avoid churn. Missing global cache contexts cause fragile, variable cache IDs; a new variation cache (implemented in the group module, tests passing) replaces single flat redirects with a cascading redirect tree, avoids tag bloat, and already integrates with JSON:API patches.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:25Goal of this session
- 2:16What is the memory cache?
- 4:57When do I use the memory cache?
- 8:21Lesson learned from the render cache
- 10:07Example usage in Group
- 13:09Why only the render cache?
- 15:11Variable cache IDs
- 16:22Example: RouteProvider
- 19:07Cache redirects in a nutshell
- 21:12RenderCache implementation
- 26:01Introducing the Variation Cache
- 33:28What did you think?
related talks
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
01h 00mDrupal 8 Caching: A Developer’s Guide
42mCaching for Cash
01h 04mCaching Best Practices
43mCache Me Outside - Caching Methodologies & Architectures
45mCaching: A trip down the rabbit hole
27mCaching for Cash
26mCache Strategies with Best Practices
