public function CacheTagsChecksumInterface::isValid

public CacheTagsChecksumInterface::isValid($checksum, array $tags)

Returns whether the checksum is valid for the given cache tags.

Used when retrieving a cache item in a cache backend, to verify that no cache tag based invalidation happened.

Parameters

int $checksum: The checksum that was stored together with the cache item.

string[] $tags: The cache tags that were stored together with the cache item.

Return value

bool FALSE if cache tag invalidations happened for the passed in tags since the cache item was stored, TRUE otherwise.

File

core/lib/Drupal/Core/Cache/CacheTagsChecksumInterface.php, line 49

Class

CacheTagsChecksumInterface
Provides checksums for cache tag invalidations.

Namespace

Drupal\Core\Cache

Code

public function isValid($checksum, array $tags);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!CacheTagsChecksumInterface.php/function/CacheTagsChecksumInterface::isValid/8.1.x