Check for a given cache key.

@param string $key

@return bool
494372
public function keyExists(string $key): bool
    {
        $result = $this->database->prepare('SELECT * FROM tl_db_cache WHERE cacheKey = ?')->execute($key);

        return $result->numRows > 0;
    }
170730
public static function has( $key )
	{
		$cache = self::instance();
		if ( $cache ) {
			return $cache->isExisting( $key );
		}
		return false;
	}
1075553
public function has($key): bool
    {
        $this->checkKey($key);
        return (bool) $this->getRedis()->keys($this->filterKey($key));
    }
76220
public function has($key)
	{
		return $this->engine->get($this->id($key)) !== false || $this->engine->getResultCode() != \Memcached::RES_NOTFOUND;
	}
1228104
protected function is($key)
    {
        switch ($key = strtolower($key)) {

            case 'ajax':
                if (!isset($this->isCache['ajax'])) {
                    return $this->isCache['ajax'] = $this->getService('Request')->isXmlHttpRequest();
                }

                return $this->isCache['ajax'];

            case 'put':
            case 'delete':
            case 'post':
            case 'patch':
                if (!isset($this->isCache['requestMethod'][$key])) {
                    $this->isCache['requestMethod'][$key] = $this->getService('Request')->getMethod() === strtoupper($key);
                }

                return $this->isCache['requestMethod'][$key];

            case 'ssl':
            case 'https':
            case 'secure':
                if (!isset($this->isCache['secure'])) {
                    $this->isCache['secure'] = $this->getService('Request')->isSecure();
                }

                return $this->isCache['secure'];

            default:
                throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");

        }
    }
591173
public function has($key)
    {
        if ($this->where == true) {
            $this->setCache($key)->setPath(CYGNITE_BASE.DS.toPath('public.storage.cache').DS);
        }

        $cached = $this->getCache();

        return !empty($cached[$key]) ? true : false;
    }
1085407
public function isCached($key) {
        // The actual working horse. The method does not only check existence of the key. It retrieves the value and stores
        // it in the local reference pool, so following cache queries can use the local reference.

        // check local reference pool
        if ($this->getReferencePool()->isCached($key))
            return true;

        // query APC cache
        $data = apc_fetch($this->namespace.'::'.$key);
        if (!$data)                                     // cache miss
            return false;

        // cache hit
        $created = $data[0];                            // data: [created, expires, serialized([$value, $dependency])]
        $expires = $data[1];

        // check expiration
        if ($expires && $created+$expires < time()) {
            $this->drop($key);
            return false;
        }

        // unpack serialized value
        $data[2]    = unserialize($data[2]);
        $value      = $data[2][0];
        $dependency = $data[2][1];

        // check dependency
        if ($dependency) {
            $minValid = $dependency->getMinValidity();

            if ($minValid) {
                if (time() > $created+$minValid) {
                    if (!$dependency->isValid()) {
                        $this->drop($key);
                        return false;
                    }
                    // reset the creation time by writing back to the cache (resets $minValid period)
                    return $this->set($key, $value, $expires, $dependency);
                }
            }
            elseif (!$dependency->isValid()) {
                $this->drop($key);
                return false;
            }
        }

        // store the validated value in the local reference pool
        $this->getReferencePool()->set($key, $value, Cache::EXPIRES_NEVER, $dependency);
        return true;
    }
469164
public function has(string $key): bool
    {
        if (strpos($key, '.') != false) {
            return $this->getNested($key) != null;
        }

        return array_key_exists($key, $this->settings);
    }
29661
public function GetCache($key)
    {
		return (array_key_exists($key, $this->_cache) ? $this->_cache[$key] : null);
	}
199694
public function has(string $key): bool
    {
        $file = $this->cacheFile($key);

        if (is_file($file)) {
            $handle = fopen($file, 'r');
            $expire = (int)trim(fgets($handle));
            fclose($handle);
            return $expire === 0 || time() < $expire;
        }

        return false;
    }
1355053
public function has($key)
    {
        if (!$this->isEnabled()) {
            return false;
        }

        return (false !== $this->server->get($this->prefix . $key));
    }
582406
protected function getCache($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }
        return false;
    }
796366
function check(CacheKey $key) {

		if (isset ( $this->elements [$key->getModule()] [$key->getProperty()] )) {
			return true;
		} else {
			return false;
		}
	}
9117
public function has($key)
    {
        /* If $key is not valid string throws InvalidArgumentException */
        if (!$this->isString($key)) {
            throw new InvalidArgumentException('Cache key must be not empty string');
        }

        return $this->getCollection()->has($key);
    }
52022
public function has($key)
    {
        $parts     = $this->getPath($key);
        $keyExists = true;
        $node      = $this->getFromCache();

        foreach($parts as $part) {
            $part = trim($part);

            if (!is_array($node) || !array_key_exists($part, $node)) {
                $keyExists = false;
                break;
            }

            $node = &$node[$part];
        }

        return ($keyExists);
    }
1213686
public function has($key) {
        $filename = $key.'.cache';
        $maxtime = cache::now() - $this->definition->get_ttl();
        if ($this->prescan) {
            return array_key_exists($filename, $this->keys) && $this->keys[$filename] >= $maxtime;
        }
        $file = $this->file_path_for_key($key);
        return (file_exists($file) && ($this->definition->get_ttl() == 0 || filemtime($file) >= $maxtime));
    }
913271
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $result = $this->db->query("SELECT key FROM cache WHERE key='" . $this->key($key) . "' WHERE expire >= datetime('now')");
        $has_key = ($result->numRows() > 0);

        $this->Logger->debug("Cache contains {$key}? " . ($has_key) ? 'TRUE' : 'FALSE');

        return $has_key;
    }