Problem/Motivation

The Varnish cache is not being cleared if we have hosted multiple applications in acquia.

Steps to reproduce

If you have hosted multiple applications in Acquia, try to clear caches in an application. The varnish caches won't be cleared.

Comments

vigneshvalliappan created an issue. See original summary.

vigneshvalliappan’s picture

Status: Active » Needs review
StatusFileSize
new3.36 KB

I have dynamically checked the application's name using the Acquia environment variable ($_ENV['AH_SITE_GROUP']). By this, we can get the current application's UUID and clear the varnish cache for a particular application.

andikanio’s picture

I found an application name doesn't match with AH_SITE_GROUP (case sensitive),
I just insert a case insensitive condition to fix it.

hkumar4’s picture

Thanks for the patch what I have noticed that AH_SITE_GROUP doesn't necessarily match with $getAppUuid_item['name'] and it results in failed condition. I was thinking to enhance this patch to include a field in the form to pass the Application_Name which would have higher priority than $_ENV['AH_SITE_GROUP']. In case the Application Name is not set in the form we can fall back to $_ENV['AH_SITE_GROUP']

hkumar4’s picture

I have added a patch with changes and also added admin route and fixed the purge form menu configuration so that it appears on config menu.

flashwebcenter’s picture

Status: Needs review » Fixed

Hello,
Thank you all for your work. I included the application name and I updated the module with an extra field. All the work was added to https://www.drupal.org/project/acquia_purge_varnish/releases/8.x-1.4

Best wishes,
Alaa

flashwebcenter’s picture

Status: Fixed » Closed (fixed)
flashwebcenter’s picture