public function CacheTagsHash::cacheTagsToHashes in Fastly 8.3
Maps cache tags to hashes.
Used when the Surrogate-Key/X-Drupal-Cache-Tags header size otherwise exceeds 16 KB.
Parameters
string[] $cache_tags: The cache tags in the header.
Return value
string[] The hashes to use instead in the header.
File
- src/
CacheTagsHash.php, line 52
Class
- CacheTagsHash
- Class CacheTagsHash.
Namespace
Drupal\fastlyCode
public function cacheTagsToHashes(array $cache_tags) {
$hashes = [];
$siteId = $this
->getSiteId();
foreach ($cache_tags as $cache_tag) {
$cache_tag = $siteId ? $siteId . ':' . $cache_tag : $cache_tag;
$hashes[] = $this
->hashInput($cache_tag);
}
return $hashes;
}