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). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). 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. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Acquia Cookie Vary

19 sites Security covered Drupal 10–11
View on drupal.org

This module helps improve website performance by integrating with Acquia's Varnish infrastructure to vary server-side caching based on specific cookie values. This eliminates content flashes and layout shifts for a seamless user experience, and can be configured to support custom cookie names for advanced personalization.

Acquia Cookie Vary is an off the shelf integration with the Acquia platform's Varnish infrastructure that allows for server-side variation on specific cookie values as documented by https://docs.acquia.com/acquia-cloud-platform/docs/performance/varnish/c....

This module is not maintained by anyone representing Acquia, but rather individuals from the Drupal community.

Why server-side cache variation?

Unlike the typical javascript driven segmentation and personalization techniques that are commonly found on the web, server-side solutions offer extreme performance and user experience benefits.

  1. Flashes of original or unstyled content are completely eliminated.
  2. Content layout shifting is completely eliminated.
  3. Pages arrive 100% intact served by a full page caching layer.

Post-Installation

This module simply adds the appropriate Vary headers based on the cache contexts that are present on a page. For example, if the following cache contexts are present on a given page: cookies:acquia_a, cookies:acquia_b, cookies:acquia_c, then this module adds Vary values for X-Acquia-Cookie-A, X-Acquia-Cookie-B, X-Acquia-Cookie-C.

Optional end-user named cookie

The Acquia platform supports a single end-user named cookie. This module provides a settings form that allows a site owner to configure the cookie name. Configuring such a value and providing an appropriate cache context will result in the response varying on X-Acquia-Cookie-Key and X-Acquia-Cookie-Value.

Debugging

Because caching is hard, an optional debug mode setting is provided. Setting debug mode will add custom response headers with their corresponding cookie values. For example, a request with a cookie acquia_a=test to a page that has a cache context of cookies:acquia_a with debug mode enabled will result in a custom response header of X-Acquia-Cookie-A: test being added.

Additional Requirements

If your project is hosted behind a CDN like Cloudflare, additional steps are required:

  1. If you are an enterprise customer, utilize the Cache Keys feature to vary on the appropriate individual cookies.
  2. If you are not an enterprise customer, a cache bypass rule will need to be added to any paths that must vary on specific cookie values.

Performance Notes

Cache variation inevitably leads to more primary memory used by Varnish. As such, there may come a time when the variation causes premature cache evictions. Acquia customers cannot access these critical metrics in a self-service fashion, but instead must submit a support ticket asking for the LRU Nuked rate.

Special Thanks

A very special thank you goes out to Lanette Miller for her invaluable assistance in this endeavor. None of this would not have been possible otherwise.

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
4
Tracked since
Feb 2025
Latest release
2 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Jun 23, 2026
1.0.0-alpha2 Pre-release 10–11 Mar 4, 2025
1.0.0-alpha1 Pre-release 10–11 Feb 25, 2025
1.0.x-dev Dev 10–11 Feb 25, 2025