public function DatabaseCacheTagsChecksum::getCurrentChecksum in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php \Drupal\Core\Cache\DatabaseCacheTagsChecksum::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
- core/
lib/ Drupal/ Core/ Cache/ DatabaseCacheTagsChecksum.php, line 83 - Contains \Drupal\Core\Cache\DatabaseCacheTagsChecksum.
Class
- DatabaseCacheTagsChecksum
- Cache tags invalidations checksum implementation that uses the database.
Namespace
Drupal\Core\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);
}