class DummyTagChecksum in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Cache/DummyTagChecksum.php \Drupal\supercache\Cache\DummyTagChecksum
Stub checksum interface, for when you need to use a cache backend without tag invalidation support.
Hierarchy
- class \Drupal\supercache\Cache\DummyTagChecksum implements CacheTagsChecksumInterface
Expanded class hierarchy of DummyTagChecksum
5 files declare their use of DummyTagChecksum
- ApcuRawBackendGeneralTestCaseTrait.php in src/
Tests/ Cache/ ApcuRawBackendGeneralTestCaseTrait.php - ChainedStorage.php in src/
KeyValueStore/ ChainedStorage.php - Contains \Drupal\supercache\KeyValueStore\ChainedStorage;
- ChainedStorageExpirable.php in src/
KeyValueStore/ ChainedStorageExpirable.php - Contains \Drupal\supercache\KeyValueStore\ChainedStorageExpirable.
- ChainedStorageTrait.php in src/
KeyValueStore/ ChainedStorageTrait.php - DatabaseRawBackendGeneralTestCaseTrait.php in src/
Tests/ Cache/ DatabaseRawBackendGeneralTestCaseTrait.php
File
- src/
Cache/ DummyTagChecksum.php, line 17 - Contains \Drupal\supercache\Cache\DummyTagChecksum.
Namespace
Drupal\supercache\CacheView source
class DummyTagChecksum implements CacheTagsChecksumInterface {
/**
* {@inheritdoc}
*/
public function getCurrentChecksum(array $tags) {
if (!empty($tags)) {
throw new \Exception("DummyTagChecksum cannot process tags.");
}
// Checksum needs to be 0 because the original
// database storage for tags was designed not
// to accept NULL.
return 0;
}
/**
* {@inheritdoc}
*/
public function isValid($checksum, array $tags) {
if (!empty($tags) || !empty($checksum)) {
throw new \Exception("DummyTagChecksum cannot process tags and items cannot have a checksum.");
}
return TRUE;
}
/**
* {@inheritdoc}
*/
public function reset() {
return;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheTagsChecksumInterface:: |
constant | The invalid checksum returned if a database transaction is in progress. | ||
DummyTagChecksum:: |
public | function |
Returns the sum total of validations for a given set of tags. Overrides CacheTagsChecksumInterface:: |
|
DummyTagChecksum:: |
public | function |
Returns whether the checksum is valid for the given cache tags. Overrides CacheTagsChecksumInterface:: |
|
DummyTagChecksum:: |
public | function |
Reset statically cached tags. Overrides CacheTagsChecksumInterface:: |