public static function SurrogateKeyGenerator::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.
Deprecated
Deprecated and will be removed in future versions. Use \Drupal::service('fastly.cache_tags.hash')->cacheTagsToHashes($cache_tags); instead.
File
- src/
EventSubscriber/ SurrogateKeyGenerator.php, line 88
Class
- SurrogateKeyGenerator
- Generates a 'Surrogate-Key' header in the format expected by Fastly.
Namespace
Drupal\fastly\EventSubscriberCode
public static function cacheTagsToHashes(array $cache_tags) {
return \Drupal::service('fastly.cache_tags.hash')
->cacheTagsToHashes($cache_tags);
}