You are here

protected static function FastlyBackend::getHashedTags in Acquia Purge 8

Salts input tags with the site identifier and hashes them.

Parameters

string[] $tags: Non-associative array cache tags.

Return value

string[] Non-associative array with salted and hashed copies of the input tags.

2 calls to FastlyBackend::getHashedTags()
FastlyBackend::invalidateTags in src/AcquiaPlatformCdn/FastlyBackend.php
Invalidate all 'tag' invalidations.
FastlyBackend::tagsHeaderValue in src/AcquiaPlatformCdn/FastlyBackend.php
Format the given cache tags for the header value representation.

File

src/AcquiaPlatformCdn/FastlyBackend.php, line 321

Class

FastlyBackend
Provides a Fastly backend for the Platform CDN purger.

Namespace

Drupal\acquia_purge\AcquiaPlatformCdn

Code

protected static function getHashedTags(array $tags) {
  $identifier = self::platformInfo()
    ->getSiteIdentifier();
  $tags_prefixed = [];
  foreach ($tags as $tag) {
    $tags_prefixed[] = $identifier . $tag;
  }
  return Hash::cacheTags($tags_prefixed);
}