Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Acquia Flush Varnish

Security covered Under active development 98 sites

This module provides an interface to manually clear the Varnish cache on Acquia Cloud or Platform CDN. It allows you to purge the cache at the domain level using the Acquia Cloud API.

Summary

The "Acquia Flush Varnish" module offers a user-friendly interface within Drupal's admin section. It enables manual purging of the Acquia Cloud Varnish and Platform CDN (if Platform CDN is enabled) cache via the Acquia Cloud API. This functionality allows developers to clear the cache at the domain level, saving time and simplifying the workflow.

Requirements

No specific requirements are needed for this module. It works seamlessly with your existing Drupal installation.

Restrictions

It only works for Acquia cloud or Acquia site factory hosted sites.

Installation

  1. Install the module as you would with any other Drupal module.
  2. Enable the Acquia Flush Varnish module in the Drupal admin.

Configuration

To configure the module, follow these steps:

  1. Add your Acquia Cloud API credentials to the Acquia server via SSH.
  2. Note: It is not recommended to store the API key and secret in the codebase or database. Instead, use the secrets.settings.php method to set up the API key and secret in Acquia Cloud or Site Factory (Acquia's recommended approach).
  3. Reference: [Acquia Document Link] (https://docs.acquia.com/secrets#section-secretssettingsphp-file)

Setting Up secrets.settings.php

Create a secrets.settings.php file with the following structure in the Acquia server's nobackup location. Then include it in settings.php (for Acquia Cloud) or the factory hook (for Acquia Site Factory):

<?php
/**
 * @file
 * File to store Acquia API details.
 */
$config['acquia_flush_varnish.settings']['acquiacloud_apikey'] = 'xxxxxx';
$config['acquia_flush_varnish.settings']['acquiacloud_secret'] = 'xxxxxxxx-yyyyy';

Frequently Asked Questions (FAQ)

Q: How do I obtain Acquia Cloud API credentials?

A: Follow these steps:

  1. Log in to Acquia Accounts using your Acquia account credentials.
  2. Navigate to Accounts > API Tokens.
  3. Create a new API key and secret in the API Tokens tab.

Enhanced Functionality with AcquiaCloud Utility Service for API Endpoint Interaction

In addition to cache clearing, users can leverage the AcquiaCloud utility service to interact with various Acquia Cloud API endpoints using either the POST or GET method in their custom modules.

$acquiaCloudUtility = \Drupal::service('acquia_flush_varnish.cloudutility');
$accessToken = $acquiaCloudUtility->getAccessToken();
$acquiaCloudUtility->getAcquiaApi($apiUrl, $accessToken, 'POST', $data); 

Contact

Current maintainers:

Drupal 9–11

Ask your assistant about Acquia Flush Varnish

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.

Activity

Tracked releases
5
Tracked since
Mar 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
2.0.4 Stable 9–11 Nov 14, 2024
2.0.3 Stable 9–11 Mar 24, 2024
2.0.2 Stable 9–10 Mar 17, 2024
2.0.1 Stable 9–10 Mar 17, 2024
2.0.0 Stable 9–10 Mar 17, 2024