Provides checksums for cache tag invalidations.
Cache backends can use this to check if any cache tag invalidations happened for a stored cache item.
To do so, they can inject the cache_tags.invalidator.checksum service, and when a cache item is written, store cache tags together with the current checksum, calculated by getCurrentChecksum(). When a cache item is fetched, the checksum can be validated with isValid(). The service will return FALSE if any of those cache tags were invalidated in the meantime.
Hierarchy
- interface \Drupal\Core\Cache\CacheTagsChecksumInterface
Related topics
- Cache API
- Information about the Drupal Cache API
File
- core/lib/Drupal/Core/Cache/CacheTagsChecksumInterface.php, line 19
Namespace
Drupal\Core\Cache
Members
Name | Modifiers | Type | Description |
---|---|---|---|
CacheTagsChecksumInterface::getCurrentChecksum | public | function | Returns the sum total of validations for a given set of tags. |
CacheTagsChecksumInterface::isValid | public | function | Returns whether the checksum is valid for the given cache tags. |
CacheTagsChecksumInterface::reset | public | function | Reset statically cached tags. |
Please login to continue.