Cacheability metadata

Cacheability metadata is used to describe the thing which is rendered with respect to its dynamism. Most of the time, as Drupal 8 module developers, we will be using this metadata when working with render arrays. We will see a bit later where else these come into play, but for now, let's see what the actual properties are and what they are used for in the context of render arrays.

When creating render arrays, there are a few things we need to think about when it comes to caching. We always need to think about these things.

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.