Cacheability metadata: How Drupal 8 solves one hard problem

marcvangend

"There are only two hard things in Computer Science: cache invalidation and naming things."

Most developers are familiar with this well-known quote. But we are lucky: Drupal 8 solves the cache invalidation part with a sophisticated yet complex caching system. The key is cacheability metadata. This information helps Drupal decide what can be cached and when it must be invalidated.

In this session, you will learn what you need to do as a module developer to leverage the powerful caching system in Drupal 8. First of all, understanding the terminology is essential. Once the concepts are clear, we will see how to correctly apply Cache Keys, Cache Tags, Cache Contexts and Cache Max-age to optimize performance and prevent security problems, while always serving up-to-date content to the end user.

Session Track

Performance and Scaling

Experience Level

Intermediate

Drupal Version