public function CacheCacheTagsChecksum::getCurrentChecksum in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Cache/CacheCacheTagsChecksum.php \Drupal\supercache\Cache\CacheCacheTagsChecksum::getCurrentChecksum()
Returns the sum total of validations for a given set of tags.
Called by a backend when storing a cache item.
Parameters
string[] $tags: Array of cache tags.
Return value
string Cache tag invalidations checksum.
Overrides CacheTagsChecksumInterface::getCurrentChecksum
File
- src/
Cache/ CacheCacheTagsChecksum.php, line 76 - Contains \Drupal\supercache\Cache\CacheCacheTagsChecksum.
Class
- CacheCacheTagsChecksum
- Cache tags invalidations checksum implementation that uses a CacheRawBackendInterface as the storage.
Namespace
Drupal\supercache\CacheCode
public function getCurrentChecksum(array $tags) {
// Remove tags that were already invalidated during this request from the
// static caches so that another invalidation can occur later in the same
// request. Without that, written cache items would not be invalidated
// correctly.
foreach ($tags as $tag) {
unset($this->invalidatedTags[$tag]);
}
return $this
->calculateChecksum($tags);
}