public function Redis_Cache::setLastFlushTime in Redis 7.3
Set last flush time
Parameters
string $permanent:
string $volatile:
2 calls to Redis_Cache::setLastFlushTime()
- Redis_Cache::clear in lib/
Redis/ Cache.php - Expires data from the cache.
- Redis_Cache::getLastFlushTime in lib/
Redis/ Cache.php - Get latest flush time
File
- lib/
Redis/ Cache.php, line 257
Class
- Redis_Cache
- Because those objects will be spawned during boostrap all its configuration must be set in the settings.php file.
Code
public function setLastFlushTime($permanent = false, $volatile = false) {
// Here we need to fetch absolute values from backend, to avoid
// concurrency problems and ensure data validity.
list($flushPerm, $flushVolatile) = $this->backend
->getLastFlushTime();
$checksum = $this
->getValidChecksum(max(array(
$flushPerm,
$flushVolatile,
$permanent,
time(),
)));
if ($permanent) {
$this->backend
->setLastFlushTimeFor($checksum, false);
$this->backend
->setLastFlushTimeFor($checksum, true);
$this->flushCache = array(
$checksum,
$checksum,
);
}
else {
if ($volatile) {
$this->backend
->setLastFlushTimeFor($checksum, true);
$this->flushCache = array(
$flushPerm,
$checksum,
);
}
}
}