Needs review
Project:
Acquia Purge
Version:
8.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2025 at 20:31 UTC
Updated:
4 Jun 2026 at 12:30 UTC
Jump to comment: Most recent
Comments
Comment #2
dave reidEven if the information is "If the module detects it is not hosted on an Acquia environment (by X means), it will not do anything" that would be super helpful!
Comment #4
m4oliveiI had occasion to dig into this today. Here's what I found. When you have an
acquia_purgePurger plugin enabled, that plugin will immediately start to receive purge module\Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidationInterfaceobject to its\Drupal\acquia_purge\Plugin\Purge\Purger\AcquiaCloudPurger::invalidate*methods (routed via\Drupal\acquia_purge\Plugin\Purge\Purger\AcquiaCloudPurger::routeTypeToMethod). The\Drupal\acquia_purge\Plugin\Purge\Purger\AcquiaCloudPurger::invalidate*methods will group invalidations and send a pool of HTTP BAN requests to a list of static IPs identified via\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface::getBalancerAddresses. This latter part is the key, digging into\Drupal\acquia_purge\AcquiaCloud\PlatformInfo::__construct(the only concrete class of type\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface), these static IPs come from\Drupal::service("settings")->get("reverse_proxies")and this setting is only defined in Acquia Cloud environments. Outside of Acquia Cloud environments, this value is NULL, and thus\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface::getBalancerAddressesreturns an empty array, which effectively means\Drupal\acquia_purge\Plugin\Purge\Purger\AcquiaCloudPurger::invalidate*methods have no servers to make their request against, and skip making any BAN requests whatsoever.All that being said, the tldr is that the Acquia Purge module effectively does nothing on non-Acquia Cloud environments, and is by my evaluation is safe to have enabled everywhere. Although, I would suggest that there is an opportunity in the code to skip a bunch of logic much earlier by checking if we're on an Acquia Cloud environment by making use of
\Drupal\acquia_purge\AcquiaCloud\PlatformInfo::isThisAcquiaCloud.I'll take a crack at a README update here.
Comment #6
m4oliveiOpened an MR to update
INSTALL.md. Ready for review.Comment #7
jwilson3I haven't dug into the module code yet, but isn't the Drupal $settings[] key either "reverse_proxy" or "reverse_proxy_addresses"?
... or, by adding a feature flag killswitch to explicitly disengage the module on specific environments via settings.local.php, so that both acquia_purge, as well as the purge module, can be enabled but effectively neutralized via $settings, to avoid complex config_split workflows.
The MR seems okay but having it also include a killswitch, in my opinion, is the better way to answer this issue's title, as currently worded. Feature flags are a well known and common paradigm/approach in Drupal contrib modules and programming in general to disable/enable features.