public function CacheBase::deleteAll in Redis 8
Deletes all cache items in a bin.
Overrides CacheBackendInterface::deleteAll
See also
\Drupal\Core\Cache\CacheBackendInterface::invalidateAll()
\Drupal\Core\Cache\CacheBackendInterface::delete()
\Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()
1 call to CacheBase::deleteAll()
- CacheBase::removeBin in src/
Cache/ CacheBase.php - Remove a cache bin.
File
- src/
Cache/ CacheBase.php, line 437
Class
- CacheBase
- Base class for redis cache backends.
Namespace
Drupal\redis\CacheCode
public function deleteAll() {
// The last delete timestamp is in milliseconds, ensure that no cache
// was written in the same millisecond.
// @todo This is needed to make the tests pass, is this safe enough for real
// usage?
usleep(1000);
$this->lastDeleteAll = round(microtime(TRUE), 3);
$this->client
->set($this
->getKey(static::LAST_DELETE_ALL_KEY), $this->lastDeleteAll);
}