public function del_old()
{
$this->acquire_key($this->ttl_table_name, $auto_unlocker);
$ttl_table = $this->read_TTL_table();
if (empty($ttl_table)) {
return true;
}
$t = time();
$changed = false;
foreach ($ttl_table as $key => $ttl) {
if ($ttl !== 0 && $ttl < $t) {
$this->memcache->delete($this->prefix . $key);
unset($ttl_table[$key]);
$changed = true;
}
}
if ($changed) {
$this->memcache->set($this->ttl_table_name, $ttl_table, null, 0);
}
return true;
}