HTTP Cache Control module helps fine grain control of Drupal's Cache Control headers.
Cache Features
- Support for shared cache max age (s-maxage)
- Support for Surrogate-Control (Fastly CDN) (2.x only)
- Ability to set cache lifetime of 404 pages
- Ability to set cache lifetime of 302 Redirects
- Ability to set cache lifetime of 500 level error pages (when in control by Drupal)
Revalidation Features
- Support for stale-if-error allowing cache proxies to server stale cache in place of an error from Drupal for a fixed period of time.
- Support for stale-while-revalidate allowing cache proxies to serve stale cache to other users while a cached item is being revalidated.
Variation
This module allows you to add arbitrary headers to the Vary response header to variate
upstream cache by the type of request headers sent.
Installation/Configuration
Simply download and install this module as per normal. Then go to the performance configuration page (admin > configuration > performance) and set the cache lifetimes accordingly.
Caution
This is an advanced module, care should be taken when fine tuning cache control headers. Please consider reading the HTTP spec on Cache Control headers: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Project categories: Performance
8,606 sites report using this module
- Created by josh waihi on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Fix the 5xx cache maximum age setting not being removed.
Development version: 8.x-2.x-dev updated 6 Feb 2026 at 15:48 UTC

