public function VarnishBackend::invalidateTags in Varnish 8
File
- src/
Cache/ VarnishBackend.php, line 105
Class
Namespace
Drupal\varnish\CacheCode
public function invalidateTags(array $tags) {
$tag_cache =& drupal_static('Drupal\\Core\\Cache\\CacheBackendInterface::tagCache', []);
$invalidated_tags =& drupal_static('Drupal\\Core\\Cache\\DatabaseBackend::invalidatedTags', []);
foreach ($tags as $tag) {
// Only invalidate tags once per request unless they are written again.
if (isset($invalidated_tags[$tag])) {
continue;
}
$invalidated_tags[$tag] = TRUE;
unset($tag_cache[$tag]);
}
}