I want to be able to select the target domain to purge the cache

Created on 25 April 2024, 7 months ago
Updated 15 May 2024, 6 months ago

Problem/Motivation

Hello project maintainers,

Currently, the acquia_purge_varnish module allows purging of the cache for either the "current domain" or "all domains". However, for setups using Drupal's multi-site feature where multiple domains are directed to the same Drupal site, this limitation is not optimal. For example, if only "current domain" is selected, administrators must log into the Drupal admin panel from each domain to utilize the purging functionality. On the other hand, selecting "all domains" results in the unwanted purging of caches for other sites, which can negatively impact their performance.

Steps to reproduce

1. Configure a Drupal installation with the acquia_purge_varnish module enabled.
2. Set up the Drupal installation as a multi-site with at least two domains pointing to the same site.
3. Attempt to selectively purge cache from specific domains using the existing settings.

Proposed resolution

The ideal solution would be to enhance the module by adding functionality that allows administrators to specify multiple domains (either through selection or by entering them) for which the cache should be purged. This could be implemented via a new form field in the module's administration interface, where users can list the domains they wish to target for cache purging. The underlying API would then handle these requests to clear caches specifically for the listed domains.

Remaining tasks

- [ ] Design the user interface for domain specification.
- [ ] Implement the new form field and functionality in the module.
- [ ] Update Method to call API to handle requests for specific domains.
- [ ] Conduct thorough testing to ensure functionality works as expected across various setups.
- [ ] Update documentation to reflect the new feature.

User interface changes

A new form field will be added to the acquia_purge_varnish module's administration page, allowing users to specify multiple domains for cache purging. This will provide greater control and flexibility for administrators managing multi-domain setups.

API changes

The module's API will be updated to accept and process requests for cache purging based on specific domains listed by the user.

Data model changes

No changes to the data model are anticipated at this time, unless further analysis reveals a need to store additional data about domain-specific purging settings.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024