Module Description
In Drupal 8 core Page Cache max age settings are applied globally to all pages, and there is no way to set a different max age per page or leverage cache metadata max-age to override Cache-Control max-age value. This means that if you're hosting your website behind a reverse proxy that honors Cache-Control header, all pages are cached with equal TTL. You can either disable cache with response policies, or cache it for the same global value.
This module is intended to solve that problem by leveraging cacheability metadata bubbled up to the page response level to override Cache-Control max-age parameter.
Installation 1. Enable the module 2. Profit, it just works, no configuration needed
Why this is not resolved in Drupal Core? This could end up in core soon, but adding it in core now might break backwards compatibility. The work is done in those 2 issues: https://www.drupal.org/node/2352009 https://www.drupal.org/node/2499321 Basically when those end up in core, this module will become obsolete unless it can find a different problem space
Roadmap: There are no plans yet to extend the configurability of the module in other ways, but suggestions are welcome in issue queue!
Versions and compatibility
* 8.x-1.0 is compatible with Drupal 8 and 9.
* 8.x-1.1 is compatible with Drupal 9. Drupal 8 is no longer supported by the project.
* 8.x-1.x is not compatible with Drupal 10 or above.
* 2.x is compatible with Drupal 10 and above. The branch is feature and config compatible with 8.x-1.x and is thusly a drop-in replacement.
This module is intended to solve that problem by leveraging cacheability metadata bubbled up to the page response level to override Cache-Control max-age parameter.
Installation 1. Enable the module 2. Profit, it just works, no configuration needed
Why this is not resolved in Drupal Core? This could end up in core soon, but adding it in core now might break backwards compatibility. The work is done in those 2 issues: https://www.drupal.org/node/2352009 https://www.drupal.org/node/2499321 Basically when those end up in core, this module will become obsolete unless it can find a different problem space
Roadmap: There are no plans yet to extend the configurability of the module in other ways, but suggestions are welcome in issue queue!
Versions and compatibility
* 8.x-1.0 is compatible with Drupal 8 and 9.
* 8.x-1.1 is compatible with Drupal 9. Drupal 8 is no longer supported by the project.
* 8.x-1.x is not compatible with Drupal 10 or above.
* 2.x is compatible with Drupal 10 and above. The branch is feature and config compatible with 8.x-1.x and is thusly a drop-in replacement.
Module Link
Project Usage
2776
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of not being able to set a different max age per page or leverage cache metadata max-age to override Cache-Control max-age value in Drupal 8 core Page Cache settings.
Data Name
cache_control_override