Jamm\Memory\RedisObject::del PHP Метод

del() публичный Метод

Delete key or array of keys from storage
public del ( string | array $keys ) : boolean | array
$keys string | array - keys
Результат boolean | array - if array of keys was passed, on error will be returned array of not deleted keys, or 'true' on success.
    public function del($keys)
    {
        if (empty($keys)) {
            return false;
        }
        if (!is_array($keys)) {
            $keys = array($keys);
        }
        $todel = array();
        $tags = $this->redis->Keys($this->tag_prefix . '*');
        foreach ($keys as $key) {
            $todel[] = $this->prefix . $key;
            $todel[] = $this->serialize_key_prefix . $key;
            $todel[] = $this->lock_key_prefix . $key;
            if (!empty($tags)) {
                foreach ($tags as $tag) {
                    $this->redis->sRem($tag, $key);
                }
            }
        }
        return $this->redis->Del($todel);
    }