Returns true if the Cache-Control directive is defined.

@param string $key The Cache-Control directive

@return bool true if the directive exists, false otherwise
10720
public function hasCacheControlDirective($key)
    {
        return isset($this->computedCacheControl[$key]) || \array_key_exists($key, $this->computedCacheControl);
    }
1061627
public function isInCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return true;
    }
    return false;
  }
602663
protected function hasKey($key)
    {
        return ($this->mode == self::MODE_INDEXED && $key == '') || \array_key_exists($key, $this->params);
    }
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));
    }
62067
public function __isset($key)
    {
        $format = $this->validateFormat($key);

        if (!$format) {
            list($op, $format) = $this->validateDiff($key);
        }

        return (bool) $format;
    }
385444
public function __isset( $key )
    {
        // Delegate
        return ( array_key_exists( $key, $this->properties ) || isset( $this->storageOptions->$key ) );
    }
1203424
public function isCached($key)
    {
        if ($cachedData = $this->loadCache()) {
            if (isset($cachedData[$key])) {
                if (!$this->isExpired($cachedData[$key]['time'], $cachedData[$key]['expire'])) {
                    return true;
                }
            }
        }
        return false; // If cache file doesn't exist or cache is empty or key doesn't exist in array, key isn't cached
    }
1075553
public function has($key): bool
    {
        $this->checkKey($key);
        return (bool) $this->getRedis()->keys($this->filterKey($key));
    }
1300431
public function has($key)
    {
        return (bool) $this->redis->exists($this->redis->prefix($key));
    }
965554
public static function removeFromCache($key)
    {
        $fullKey = static::makeCacheKey($key);
        if (!Cache::forget($fullKey)) {
            return false;
        }

        static::removeKeys($key);

        return true;
    }
271070
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $contains = ($this->get($key) !== false);

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

        return $contains;
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
207676
public function has($key)
    {
        //~ Check if enabled
        if (!$this->isEnabled()) {
            return false;
        }

        //~ Clear expired Cache files
        $this->clearExpired();

        $key = $this->prefix() . $key;

        return isset($this->cache[$key]);
    }
25654
public function has(string $key) : bool
    {
        if (isset($this->items[$key])) {
            return true;
        }

        try {
            $class = new \ReflectionClass($key);
        } catch (\ReflectionException $e) {
            return false;
        }

        $classes = $this->reflectionTools->getClassHierarchy($class);

        foreach ($classes as $class) {
            if ($this->injectionPolicy->isClassInjected($class)) {
                $this->bind($key); // @todo allow to configure scope (singleton) with annotations

                return true;
            }
        }

        return false;
    }
475304
static function hasKey(string $key): bool
    {
        self::ensureKeyMapLoaded();

        return isset(self::$keyMap[static::class][$key]);
    }
400689
public function has(string $key): bool
    {
        return array_key_exists(strtolower($key), $this->keyMap) &&
            array_key_exists($this->keyMap[strtolower($key)], $this->collection);
    }
818496
public function has($key)
    {
        // Got help from here: http://stackoverflow.com/a/3091136/1208233
        if (!$this->memcached->add($key, true, 10)) {
            // If not possible to add, then the key exists
            return true;
        } else {
            // If possible to add, then the key doesn't exist
            $this->memcached->delete($key);
            return false;
        }
    }