public function del($key)
{
$auto_unlocker = NULL;
if (!$this->sem->get_access_write($auto_unlocker)) {
return false;
}
$this->readmemory();
if (empty($this->mem)) {
return false;
}
if (!is_array($key)) {
$key = array($key);
}
foreach ($key as $arr_key) {
$arr_key = (string) $arr_key;
unset($this->mem[self::map_keys][$arr_key]);
unset($this->mem[self::map_key_ttl][$arr_key]);
if (!empty($this->mem[self::map_key_tags])) {
foreach ($this->mem[self::map_key_tags] as $tag_index => &$tag) {
$indexes = array_keys($tag, $arr_key);
if (!empty($indexes)) {
foreach ($indexes as $index) {
unset($tag[$index]);
}
if (empty($tag)) {
unset($this->mem[self::map_key_tags][$tag_index]);
}
}
}
}
unset($this->mem[self::map_key_locks][$arr_key]);
}
return $this->refresh();
}