You are here

protected function D8Cache::getCurrentChecksum in Drupal 8 Cache Backport 7

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.

1 call to D8Cache::getCurrentChecksum()
D8Cache::set in ./d8cache.cache.inc

File

./d8cache.cache.inc, line 263

Class

D8Cache
Defines a Drupal 8 cacheable metadata aware cache backend.

Code

protected function getCurrentChecksum(array $tags) {
  if (!$this
    ->ensureInstalled()) {

    // When the module has not been installed yet, don't calculate a checksum.
    return 0;
  }
  return d8cache_cache_tags_get_current_checksum($tags);
}