Install

Works with Drupal: ^10.1 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 70.79 KB
MD5: 8b9b53520b4775469379d6e00f4fee38
SHA-1: 85223c8edb37233ef4f4a45c31d4ade2f89793e1
SHA-256: 632cbd878cea41f901e15d9abc8ee2875ea3ef2689345f9b669cbea2e58ecee8
Download zip 126.5 KB
MD5: b508861050a3c05e1f11d7b65e0b306e
SHA-1: 8c64a403b4e023240d40423f000864deec585dc6
SHA-256: 70415e3f5782566d4c0f75d9db043276445ae65d9ced37856ebe2e470998316d

Release notes

A bug fix release for a regression in 4.2.0, with one behaviour change for redirects. No API changes, no change to the supported core versions, no change to the shipped VCL.

If you are on 4.2.0, please upgrade. On a site that never changed the core "Browser and proxy cache maximum age" setting, 4.2.0 does not cache anything in Varnish.

Varnish cached nothing with the default core setting

Core ships with "Browser and proxy cache maximum age" set to no caching, and in that state it marks every response must-revalidate, no-cache, private. 4.2.0 started to respect a Cache-Control header set by a controller #3586257: CacheableResponseSubscriber overrides custom Cache-Control headers set by controllers, and mistook that core default for one. The header went to Varnish untouched, and Varnish refuses to store a private response. #3636699: Default Drupal max page cache setting disables Varnish caching

  • Anonymous pages were not cached unless the core lifetime had been raised on the Performance page. The lifetime configured in the module was ignored.
  • "Enable varnish for authenticated users" had no effect at any core lifetime, because core marks every response to a logged in user the same way.
  • A Cache-Control header attached to a render array was replaced by the module default. Headers set through #attached['http_header'], including ones attached by a placeholder or a lazy builder, are applied by core after the module looks at the response. They are now read from the final response, so a page that asks for no-store or its own s-maxage gets it.

The module now decides from the header the controller set, before core adjusts it. A response without one gets the module lifetime again, whatever the core setting is.

Updating your VCL

Nothing to do. varnish/default.vcl is the same as in 4.2.0.

Testing

The suite is green on Drupal 10, 11 and 12. This regression got through because every test and every test site ran with a raised core lifetime, so the default was never exercised. The header tests now run at both the core default and a raised lifetime, and a new test installs the module on an untouched site and checks what Varnish would receive. The fix was also verified against a live Varnish 9.0: an anonymous page goes MISS then HIT at both lifetimes, two users with the same roles share the page while each sees their own ESI block, and a redirect is never held.

Reported by Eelke Blok. Fixed by Eelke Blok and Andrey Rachinskiy.

Created by: shumer
Created on: 11 Nov 2026 at 18:29 UTC
Last updated: 11 Nov 2026 at 18:30 UTC
Bug fixes

Other releases