Drupal 8 cache for developers
summary
Generates a module and blocks with Drupal Console, demonstrates a “Hello user X” bug where a cached render array shows user1 to user2, and fixes it by adding the user cache context; builds a related-content block that incorrectly serves the same list across nodes and fixes it with a URL/path cache context. Shows toggling render cache via development.services.yml, uses cache.tags and max-age for config and queries, uses cache.factory so memcache works, and demos BigPipe with a 2s lazy fragment that renders after the page.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:13Drupal Console overview
- 8:51Disabling cache locally
- 13:03Creating a related content block
- 24:03Cache strategies in Drupal 8
- 30:20Fixing cache context issues
- 37:48Custom cache contexts
- 39:14BigPipe module demo
- 42:12Cache API beyond render arrays
- 44:45Resources and conclusion
related talks
41mDrupal 8 Module Development
23mSf Cache Component: Speed Up Your App with a New Cache Layer
48mBuilding Really Fast Applications
42mDrupal8 for Symfony developers
38mReact as a Developer Health Tool
43mYour First Drupal 9(or 8) Module
41mWhat’s New in Drupal 8?
33mTooling For The Modern WebApp Developer
