Skip to main content
[2026-03-14]

Understanding Drupal: A Complete Guide to Caching Layers is now published!

After starting in early 2023 and having a long hiatus from writing, my book Understanding Drupal: A Complete Guide to Caching Layers is now published on LeanPub! Three years ago (😱), I started working on this book that I wanted to self-publish. I got to about 65% of the way there and had a hard time wrapping up. Then things got busy at work, as I helped lead the launch of Acquia Source. But now it is here!

My book Understanding Drupal: A Complete Guide to Caching Layers covers the full stack of Drupal's caching architecture. You will learn how cacheable metadata flows through the render pipeline, how cache backends store and invalidate data, how HTTP response headers instruct reverse proxies, and how to write modules that participate correctly at every layer. Chapters progress from core concepts to debugging real-world cache failures and writing cacheable code from scratch.

Here is a chapter overview:

  1. Cacheable metadata: tags, contexts, and max age explains cacheable metadata, the building blocks of Drupal's Cache API. You'll learn how to use cache tags for invalidation, cache contexts for variations, and max-age for time-based expiration.
  2. Cache items, their backends, and stores demonstrates how to interact with cache items and backends. This chapter covers the technical implementation of cache storage, including database and other backend options.
  3. Render (fragment) cache explains how Drupal's render pipeline leverages caching to implement fragment caching for parts of its render tree. You'll understand how Variation Cache works and how to optimize render caching.
  4. Caching responses explains how Drupal implements response caching and the ability to stream partially cached responses. Learn about Dynamic Page Cache, Internal Page Cache, and BigPipe for optimal response delivery.
  5. HTTP caching headers explains HTTP caching headers and how Drupal generates and sets these headers based on cacheable metadata values. Understand Cache-Control, ETag, Vary, and other headers that control browser and proxy caching.
  6. Reverse proxies and CDNs explains how Drupal's Cache API can influence reverse proxies and CDNs sitting in front of Drupal. Discover how to integrate with Varnish, CloudFlare, and other external caching layers.
  7. Debugging your cache walks through debugging Drupal's caching layers. Learn tools and techniques for inspecting cache metadata, verifying cacheability, and troubleshooting caching issues.
  8. Writing code with cacheability in mind provides examples and tips for writing code with cacheability in mind. This chapter offers practical patterns and best practices for making your custom code cacheable.

📘 Understanding Drupal: A Complete Guide to Caching Layers — my new book is out now!