Introduction: The Acquia Purge Varnish module is specifically crafted for Drupal sites hosted on Acquia Cloud, providing a seamless way to manually clear the Varnish cache. By leveraging the Acquia Cloud API V2 and utilizing the Guzzle HTTP client, this module moves away from traditional cURL commands, aligning with Acquia's recommended practices.
Mission: My mission with the Acquia Purge Varnish module is to make Drupal accessible to everyone, especially small businesses. By simplifying cache management and enhancing security, I aim to empower Drupal site administrators to maintain optimal performance effortlessly.
Key Features and Security:
- Ease of Use: Allows Drupal users with the appropriate permissions to clear the Acquia Cloud Varnish cache for each environment easily.
- Enhanced Security: Utilizes custom CSRF tokens and the Guzzle HTTP client for all API requests, minimizing the risk of CSRF exploits and other security vulnerabilities.
Dependencies and Requirements: Installing the Acquia Purge Varnish module is straightforward:
- Exclusively for Acquia: Tailored to operate within Acquia's hosting environment, ensuring compatibility and performance.
- Acquia Credentials Needed: Requires Acquia's API Key and API Secret, with the necessary permissions, to function correctly.
Configuration and Multi-Application Support: Configuring the Acquia Purge Varnish module is intuitive:
- Straightforward Configuration: API Key & API Secret can be configured via the Drupal admin interface or injected directly into
settings.php
for added security. - Multi-Application Flexibility: Supports multiple applications on Acquia, accommodating varied environments and application names.
Permissions and Security Measures:
- Configurable Permissions: Administrators can grant cache clearing permissions to any Drupal role, enhancing operational flexibility.
- Secure Credential Handling: Ensures the secure deletion of the API Key and API Secret from the database upon module uninstallation.
Legal and Ethical Design:
- Independent Development: This module is an independent open source project, not officially developed, maintained, or endorsed by Acquia Inc., but utilizes their API for enhanced site management capabilities.
Installation:
Installation: Install the module via Composer by running the following command:
composer require drupal/acquia_purge_varnish
Enable the Module: Once installed, enable the module through the Drupal admin interface or by using Drush:
drush en acquia_purge_varnish -y
Clear Caches: After enabling the module, clear your Drupal caches to ensure the new plugin is available:
drush cr
- Using Drupal Admin Interface: Navigate to Extend, find the module, enable it, and save the configuration.
Configuration:
- Enter Acquia Credentials:
- Configure the API Key and API Secret via the Drupal admin interface or inject them directly into
settings.php
for enhanced security.
- Configure the API Key and API Secret via the Drupal admin interface or inject them directly into
- Set Permissions:
- Grant cache clearing permissions to the appropriate roles.
Usage: Using the Acquia Purge Varnish module is simple:
- Access Cache Clearing Interface:
- Navigate to the module's interface via the Drupal admin menu.
- Clear Varnish Cache:
- Use the provided options to clear the Varnish cache for the selected environment.
Conclusion: Implementing the Acquia Purge Varnish module can significantly enhance the performance and security of your Drupal site on Acquia Cloud. Developed by Alaa Haddad, a seasoned Drupal expert, this module leverages years of experience to provide reliable and effective cache management solutions. By integrating this module, you can ensure your site's cache is efficiently managed, maintaining optimal performance and security.