If this module is used on a Domain Access-enabled site, or on a site with multiple domains configured in some other way, there's a good possibility that one path might be accessible through multiple domains.

Currently, only the domain that's actively being used when, for example, hook_node_update() is hit is cleared.

So if you have:

And the content editor is logged in at www.example.com, only www.example.com/path would be cleared.

Modules like Acquia Purge have configuration variables like acquia_purge_domains to allow for multiple domains to be configured explicitly, and supporting this kind of functionality doesn't seem like it would be too difficult to do, likely only involving a few changes in AkamaiCacheControlClient to make basepath able to be an array of base paths.

Issue fork akamai-2418683

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

geerlingguy’s picture

Status: Active » Needs review
StatusFileSize
new2.35 KB

Taking an initial stab at this; the patch adds a new akamai_additional_basepaths variable that can store additional domains, but doesn't expose this advanced parameter to the admin UI, mostly because it should be pretty rare that a site needs to use it.

diamondsea’s picture

Have you tried the Expire Alias module: https://www.drupal.org/project/expire_alias

It sounds like it might do what you're looking for.

damienmckenna’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

The 7.x-3.x codebase changed a good bit and it now uses the "akamai_hostname" variable instead of "akamai_basepath". And a note should be added to the README file explaining its usage.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new2.33 KB

This patch expands usage of the current "akamai_hostname" variable so that it allows multiple hostnames to be provided, just by separating them with a space.

WidgetsBurritos’s picture

Status: Needs review » Postponed
moshe weitzman’s picture

Version: 7.x-3.x-dev » 4.x-dev
Status: Postponed » Needs work

This is needed on the current branch as well, so reopening. If this is already possible there, feel free to close. Thanks.

moshe weitzman’s picture

Version: 4.x-dev » 5.x-dev

ajits made their first commit to this issue’s fork.

ajits’s picture

Status: Needs work » Needs review

Created a merge request that adds a new setting to add multiple base paths. The older basepath is still deprecated and preserved for backwards compatibility. An upgrade path is also provided.

ajits’s picture

Created #3546437: Allow purging sub-domains of basepath that should solve sub-domain issue. This issue could track multiple domains.

plach’s picture

Status: Needs review » Needs work
ajits’s picture

Status: Needs work » Needs review

Feedback addressed.
Also closed #3546437: Allow purging sub-domains of basepath in favor of this issue.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works well, thanks!

plach’s picture

Status: Reviewed & tested by the community » Needs work

Actually, this is introducing some CI warnings.

ajits’s picture

Status: Needs work » Reviewed & tested by the community

The failure is in "Composer (next major)" build step. I tried to run a new pipeline. The normal "Composer" build passes. There are other PRs that fail at the composer step too. This doesn't seem to be related to the fixes made.

  • smustgrave committed 29817d4b on 6.0.x
    feat: #2418683 Allow purging of additional basepaths
    
    By: geerlingguy
    By...

smustgrave made their first commit to this issue’s fork.

smustgrave’s picture

Version: 5.x-dev » 6.0.x-dev
Status: Reviewed & tested by the community » Fixed

This one appears to have been reviewed and fine tuned already. Going to include in 6.0.x for sure.

Since the MR on 5.0x was done went ahead and included there too.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.