Check if the cache entry exists

@param string $key
@return bool
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;
    }
494372
public function keyExists(string $key): bool
    {
        $result = $this->database->prepare('SELECT * FROM tl_db_cache WHERE cacheKey = ?')->execute($key);

        return $result->numRows > 0;
    }
242177
public function do_exists($key)
    {
        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        return (bool)$redis->exists($this->_prefix . $key);
    }
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;
        }
    }
300181
public function exists(string $key)
    {
        return $this->useRedis(function($resource, $redis) use($key){
            return $redis->hexists($this->getStoreKey(), $key);
        });
    }
220977
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = array_key_exists($this->key($key), $this->cache);

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

        return $has_key;
    }
964085
public function exists($key)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        return array_key_exists($key, $this->configs);
    }
1061627
public function isInCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return true;
    }
    return false;
  }
76220
public function has($key)
	{
		return $this->engine->get($this->id($key)) !== false || $this->engine->getResultCode() != \Memcached::RES_NOTFOUND;
	}
1018717
public function isCached($key) {
    if (false != $this->_loadCache()) {
      $cachedData = $this->_loadCache();
      return isset($cachedData[$key]['data']);
    }
  }
1300431
public function has($key)
    {
        return (bool) $this->redis->exists($this->redis->prefix($key));
    }
1077463
public function has($key)
    {
        $flashMessages = $this->storage->get(self::FLASH_KEY);
        return isset($flashMessages[$key]);
    }
659989
protected function exists($key)
    {
        $data = $this->read($key);
        if ($data === false) {
            return false;
        }

        $expire = $data[0];
        if ($expire !== 0 && $expire < time()) {
            // expired, don't keep it around
            $path = $this->path($key);
            $this->filesystem->delete($path);

            return false;
        }

        return true;
    }
684459
public function exists($key) {
		return isset($this->_data[$key]) || isset($this->registered[$key]);
	}
720766
public function has($key)
    {
        // For performance, we can use isset,
        // but it will not match if value == 0
        return isset($this->values[$key]) || array_key_exists($key, $this->values);
    }
1037200
private function exists($key)
    {
        $data = Query::from($this->table)->where('name', '=', $key)->get();

        return  count($data) > 0;
    }
1068984
public function existsItem(string $key): bool
    {
        if (!$this->adapter instanceof iAdapter) {
            return false;
        }

        $storeKey = $this->calculateStoreKey($key);

        // check static-cache
        if ($this->checkForStaticCache($storeKey)) {
            return true;
        }

        return $this->adapter->exists($storeKey);
    }