Introduction: The Cloudflare Purge module is designed to streamline the process of purging cached resources from Cloudflare, moving away from traditional cURL commands to the more efficient Guzzle HTTP client. This module is a game-changer for Drupal users needing to manually clear the Cloudflare cache without direct access to the Cloudflare module or the ability to enable the purge module. It’s perfect for scenarios where Cloudflare is activated through a Certified Cloudflare Hosting Partner or directly via the Cloudflare module but lacks purge functionality.
Mission: My mission with the Cloudflare Purge module is to make Drupal accessible to everyone, especially small businesses. By simplifying cache purging processes and enhancing security, I aim to empower Drupal site administrators to maintain optimal performance and security effortlessly.
Key Features and Benefits:
- Simplified Purging: Transforms complex cURL commands into straightforward Guzzle HTTP client requests.
- Broad Usage Scenarios: Ideal for users without the Cloudflare module or those unable to install the purge module.
- Enhanced Security: Incorporates custom CSRF tokens and leverages the Guzzle HTTP client for all API calls, mitigating CSRF exploits and security risks.
Requirements and Installation: Installing the Cloudflare Purge module is straightforward:
- Compatibility: Exclusively for Drupal sites utilizing Cloudflare.
- Credentials: Requires Cloudflare Zone ID and Authorization (X-AUTH-KEY) for operation.
Installation: Install the module via Composer by running the following command:
composer require drupal/cloudflare_purge
Enable the Module: Once installed, enable the module through the Drupal admin interface or by using Drush:
drush en cloudflare_purge -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 and Permissions: Configuring the Cloudflare Purge module is user-friendly:
- Enter Credentials:
- Zone ID and Authorization can be entered via the Drupal admin interface or directly in the
settings.php
for enhanced security and convenience.
- Zone ID and Authorization can be entered via the Drupal admin interface or directly in the
- Flexible Permissions:
- Drupal administrators can grant purge permissions to any Drupal role, ensuring controlled access to cache purging capabilities.
Security and Legal Notice:
- Robust Security Measures: Upon module uninstallation, Zone ID & Authorization credentials are securely removed from the database.
- Open Source and Independent: This module is an independent open-source project, not affiliated with or supported by Cloudflare Inc., utilizing their API to enhance Drupal site management.
Conclusion: Leveraging the Cloudflare Purge module can significantly enhance the performance and security of your Drupal site. Developed by Alaa Haddad, a seasoned Drupal expert, this module provides reliable and effective solutions for cache management. By integrating the Cloudflare Purge module, you can ensure your site's cache is efficiently managed, maintaining optimal performance and security.