protected function CoordinatedWriteCounterTrait::clearFastStorageIfInvalid in Supercache 2.0.x
Same name and namespace in other branches
- 8 src/Cache/CoordinatedWriteCounterTrait.php \Drupal\supercache\Cache\CoordinatedWriteCounterTrait::clearFastStorageIfInvalid()
Some storage backends cannot rely on the information provided by $this->getLastWrite() to tell what items they should invalidate. Calling this method will clear all of the fast backend if it is considered not to be consistent with the contents of the persistent backend.
Will only work once per instance.
2 calls to CoordinatedWriteCounterTrait::clearFastStorageIfInvalid()
- ChainedFastRawBackend::counterGetMultiple in src/
Cache/ ChainedFastRawBackend.php - Get multiple counter values at once.
- ChainedFastRawBackend::getMultiple in src/
Cache/ ChainedFastRawBackend.php - Returns data from the persistent cache when given an array of cache IDs.
File
- src/
Cache/ CoordinatedWriteCounterTrait.php, line 105
Class
- CoordinatedWriteCounterTrait
- Used by components to coordinate invalidations between a volatile and a persistent storage.
Namespace
Drupal\supercache\CacheCode
protected function clearFastStorageIfInvalid() {
if (empty($this->fastStorageInvalid)) {
$this
->getLastWrite();
if ($this->fastStorageInvalid) {
$this
->clearFastStorage();
}
}
}