Problem/Motivation

The module has a configuration option for a cache tag prefix, however this needs to be manually configured per site.

Discussed with @lleber and @bkosborned in slack and we ended up with a settings key instead of config, to encourage per-install configuration (in case staging and prod share the same zone). And then a fallback to hash_salt when not configured.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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:

  • 1.0.x Comparecompare
  • 1 hidden branch
  • 3606982-settings Comparechanges, plain diff MR !3

Comments

catch created an issue. See original summary.

catch’s picture

Issue summary: View changes
Status: Active » Needs review

bkosborne’s picture

Change is good but lets get the tests updated now that I merged them in, too.

luke.leber made their first commit to this issue’s fork.

luke.leber’s picture

Status: Needs review » Needs work
luke.leber’s picture

Alright, back to NR - in addition to the test changes, I did rename the setting from cloudfare_purger_cache_tag_prefix to cloudflare_purger_cache_tag_prefix -- which threw me for a much bigger loop than I would have thought possible.

luke.leber’s picture

Status: Needs work » Needs review
catch’s picture

I did rename the setting from cloudfare_purger_cache_tag_prefix to cloudflare_purger_cache_tag_prefix -- which threw me for a much bigger loop than I would have thought possible.

I also had to read this comment three times before I could spot the difference..

luke.leber’s picture

Version: » 1.0.x-dev

This looks great to me, FWIW. Rolling this out on Acquia hosting, I'd recommend setting something like this in the settings.php file (for ACE).

if (isset($_ENV['AH_SITE_GROUP'], $_ENV['AH_SITE_ENVIRONMENT'])) {
  $settings['cloudflare_purger_cache_tag_prefix'] = "{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}";  
}

or

if (isset($_ENV['AH_SITE_GROUP'], $_ENV['AH_SITE_ENVIRONMENT'], $_ENV['AH_DRUPAL_SITE_NAME'])) {
  $settings['cloudflare_purger_cache_tag_prefix'] = "{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}.{$_ENV['AH_DRUPAL_SITE_NAME']}";  
}

for ASF / MEO
or

if (isset($_ENV['PANTHEON_SITE_NAME'], $_ENV['PANTHEON_ENVIRONMENT'])) {
  $settings['cloudflare_purger_cache_tag_prefix'] = "{$_ENV['PANTHEON_SITE_NAME']}.{$_ENV['PANTHEON_ENVIRONMENT']}";  
}

on Pantheon hosting.

  • catch committed 75abf479 on 1.0.x
    task: #3606982 Consider using the hash salt for tag uniqueness
    
    By:...
catch’s picture

Status: Needs review » Fixed

Gave this another read through and I think it's the right approach. Committed/pushed to 1.0.x, thanks!

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.