Change record status: 
Introduced in branch: 

Before this patch, Drupal 8 had a cache_tags header whose value was the PHP serialization of the cache tags that the page cache should store. It was essentially the leaking of an implementation detail.

That needed to be cleaned up. But at the same time, that information could be helpful, if it was not a PHP serialization. So instead of removing that "internal" header, we converted it into a proper header and called it X-Drupal-Cache-Tags. Its value is now a space separated list of flattened cache tags. E.g. if you're looking at /node/5, you'll have a header that looks like this: X-Drupal-Cache-Tags: node_view node_view_article node:5 user:1 filter_format:basic_html taxonomy_term:1 taxonomy_term:2 taxonomy_term_view menu:tools menu:footer menu:main menu:account.

This has several nice consequences:

  • This makes it trivial to apply cache tag-based invalidation to reverse proxies (like Varnish). It'll then also be possible for Drupal's page cache to work like just another reverse proxy, but a built-in one.
  • It becomes trivial to write tests that check whether a certain cache tag has bubbled up the page correctly (and whether a certain thing is present on the page).
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done