public static function FastlyBackend::tagsHeaderValue in Acquia Purge 8
Format the given cache tags for the header value representation.
Parameters
string[] $tags: Non-associative array cache tags.
Overrides BackendInterface::tagsHeaderValue
See also
\Drupal\purge\Plugin\Purge\TagsHeader::getValue
File
- src/
AcquiaPlatformCdn/ FastlyBackend.php, line 216
Class
- FastlyBackend
- Provides a Fastly backend for the Platform CDN purger.
Namespace
Drupal\acquia_purge\AcquiaPlatformCdnCode
public static function tagsHeaderValue(array $tags) {
$tags_hashed = self::getHashedTags($tags);
// Always add a hashed site identifier to the tags on the Surrogate-Key
// header, so that ::invalidateEverything() can use it to wipe the CDN.
$tags[] = $identifier = self::platformInfo()
->getSiteIdentifier();
$tags_hashed[] = current(Hash::cacheTags([
$identifier,
]));
return new TagsHeaderValue($tags, $tags_hashed);
}