This module allows you to manage your Varnish cache on Acquia Cloud Platform directly from your Drupal site. You can clear caches through a web interface or Drush commands, with options to target specific domains or all domains within your environment.
Acquia Purge Varnish clears the Varnish cache on Acquia Cloud from the Drupal admin or from Drush. It is for sites hosted on Acquia Cloud.
It purges the domains of the current Acquia environment through the Acquia Cloud API.
Start here
Features
- Settings: Under Configuration → Acquia Purge Varnish, "Settings" has the fields "API Key", "API Secret" and "Application Name". Leave "Application Name" empty to detect it from the Acquia environment.
- Domains to purge: The question "Which domain(s) from @env should be purged?" (the environment name replaces @env) offers the current domain, all domains, or custom domains. With the custom choice, list them in "Custom domains".
- Purge varnish: The "Purge varnish" page sends the purge request for the chosen domains.
- Request logging: Tick "Log API requests" to record the calls to the Acquia API. It is a setting you turn on yourself.
- Credentials in settings.php: A
$settings['acquia_purge_varnish_credentials']override can supply the credentials instead of the form. The form then shows a notice. - Status report: The Drupal status report has rows for OAuth and for a settings.php credential override.
- Drush: Five commands, each with a short alias:
acquia-purge-varnish:purge(apv-purge, with--domainand--domains),acquia-purge-varnish:status(apv-status),acquia-purge-varnish:list-domains(apv-domains, with--formatas table, json or yaml),acquia-purge-varnish:config(apv-config, with--api-key,--api-secret,--application-name,--domain,--log-requestsand--custom-domains) andacquia-purge-varnish:test-credentials(apv-test). Each short alias also works with a colon, such asapv:purge.
Permission
- "Administer Acquia Purge Varnish" is required for the landing page, "Settings" and "Purge varnish". It is marked restricted.
- Sites that granted the old "Acquia Purge Varnish" permission are moved to the new one by
drush updb.
Uninstalling the module deletes its settings.
Submodule
- Acquia Purge Varnish Test: A mock API client used for testing.
Installation: get started in 3 steps
- Install the module with Composer:
composer require drupal/acquia_purge_varnish - Enable it on the Extend page, or with Drush:
drush en acquia_purge_varnish - Open "Settings" under Configuration → Acquia Purge Varnish, enter "API Key" and "API Secret", and save. Then open "Purge varnish" to run a purge, or run
drush apv-testto test the credentials.
Requirements
- Drupal 10, 11 or 12
- PHP 8.1 or later
- A site hosted on Acquia Cloud, with Acquia Cloud API credentials
The module needs no other Drupal module. Composer installs the library league/oauth2-client with it.
Acquia Purge Varnish is an independent project and is not affiliated with Acquia Inc.
Support and maintenance
Questions, ideas, and bug reports are welcome. Please use this project’s issue queue so discussions and solutions remain available to the Drupal community.
Maintainers monitor issues, but response times depend on availability.
Developed and maintained by Alaa Haddad of Flash Web Center, LLC.
AI disclosure: AI tools assisted with drafting and reviewing this project description. The maintainer verified the final content against the project source.
Ask your assistant about Acquia Purge Varnish - API V2
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
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.