Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

HTTP Cache Control

9,329 sites Security covered Drupal 9–11
View on drupal.org

This module provides fine-grained control over Drupal's HTTP cache control headers, allowing you to configure cache lifetimes for various response types including errors and redirects, and to set advanced cache behaviors like stale-if-error and stale-while-revalidate. It also allows customization of the `Vary` header to cache content based on request headers.

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

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Dec 2024
Latest release
6 months ago
Releases (12 mo)
3
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
8.x-2.9 Stable 9–11 Feb 6, 2026
8.x-2.8 Stable 9–11 Jan 5, 2026
8.x-2.7 Stable 9–11 Dec 30, 2025
8.x-2.6 Stable 9–11 Feb 28, 2025
8.x-2.5 Stable 9–11 Dec 27, 2024
8.x-2.4 Stable 9–11 Dec 3, 2024