查询某一个键是否存在
@param string $key 键
@return bool
174296
public function has(string $key)
    {
        //初始化会话
        yield $this->start();

        $data = yield $this->sessionHandler->read($this->sessionId);
        if (!$data) {
            return false;
        }

        $data = json_decode($data, true);
        if (!isset($data[$key])) {
            return false;
        }

        return true;
    }
379742
public function exists(string $key) : bool
    {
        $this->checkCallback();
        return isset($this->members[$key]);
    }
1024320
public function has($key = '')
    {
        try {
            if ($this->cacheInstance !== NULL && is_object($this->cacheInstance)) {
                /**
                 * @var $cache object
                 */
                $cache = $this->cacheInstance->getItem($key);
                if (!$cache->isHit()) {
                    return FALSE;
                } else {
                    return TRUE;
                }
            } else {
                $this->debug->error(__FUNCTION__, 'Unavailable cacheInstance');

                return FALSE;
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
743275
public function delete(string $key): bool
    {
        $func = self::$type . '_delete';
        $func($key);
        return parent::delete($key);
    }
763943
public function has(string $key): bool
    {
        $result = $this->iterateConfig($key);

        return !($result === null);
    }
673233
public function delete(string $key): bool
    {
        $this->checkConnection(__METHOD__);
        $delete = $this->engine->delete($key);
        if ($delete && $this->index) {
            $this->index->events()
                ->trigger(Indexing::EVENT_ON_DELETE)
                ->params($key)
                ->fire();
        }

        return $delete;
    }
1249577
public function has(string $key): bool
    {
        return isset($this->data[ $key ]) && !empty($this->data[ $key ]);
    }
1088173
public function has($key)
    {
        $keys = (func_num_args() > 1) ? func_get_args() : (array) $key;

        foreach ($keys as $key) {
            if(!array_key_exists($key, $_SESSION))
                return false;
        }

        return true;
    }
1296614
public function rm(string $key): bool {
		return $this->driver->del($key) === 0 ? false : true;
	}
1130787
public function has($key)
    {
        $key = $this->getKeyCode($key);

        $value = $this->memcacheObj->get($key);
        
        if (!$value) {
            return false;
        } else {
            return true;
        }
    }
79293
public function hasKey($key)
    {
        if ($this->cache->hasKey($key)) {
            return true;
        }
        $row = $this->database->table($this->config['db_table'])->where('key', $key)->first(['value']);

        return (count($row) > 0);
    }
417126
public function has($key)
    {
        $keys = explode('.', (string)$key);
        $data = &$this->data;
        foreach ($keys as $key) {
            if (!isset($data[$key])) {
                return false;
            }
            $data = &$data[$key];
        }

        return true;
    }
13512
public function exists(string $key): bool
    {
        $result = $this->execute([
            [
                'command' => 'get',
                'key' => $key,
                'result' => ['key']
            ]
        ]);
        return isset($result[0]['key']);
    }
972886
public function ifExists(string $key): bool
    {
        if ($this->get($key) === false) {
            return false;
        }

        return true;
    }
1141697
public function has($key)
    {
        if ($this->offsetExists($key) && (bool) $this->offsetGet($key)) {
            return true;
        }

        return false;
    }
1105598
public static function has($key) {
        try {
            $b = self::getCache()->has($key);
            self::release();
            return $b;
        } catch (\RuntimeException $e) {
            self::release();
            throw $e;
        } catch (\Error $e) {
            self::release();
            throw $e;
        }
    }
880129
public function delete(string $key): bool
    {
        /**
         * @var $handle \Memcache|\Memcached
         */
        $handle = $this->_handle;
        $ret = $handle->delete($key);
        Debug::setCache(static::$type, 'delete', $key, $ret);
        return $ret;
    }