Checks if data exists in cache
@param $key
@return bool|string[]
353640
public function exists($key) {
        if (!array_key_exists($key, $this->storage))
            return false;

        if ($this->storage[$key]['expires'] > 0 && time() > $this->storage[$key]['expires'])
            return false;

        return true;
    }
1217973
public function get($key)
    {
        $cache_data = $this->getItem($key);
        if ($cache_data === false || !is_array($cache_data)) {
            return false;
        }

        return $cache_data['data'];
    }
964085
public function exists($key)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        return array_key_exists($key, $this->configs);
    }
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;
    }
1327855
public function has($key)
    {
        $key = $this->normalizeCacheKey($key);

        return $this->cache
            ->tags('views')
            ->has($key);
    }
233934
private function find($key)
    {
        if ($this->exists($key)) {
            $data = Query::from($this->table)
                        ->where('name', '=', $key)
                        ->first();

            if ($data->lifetime >= time()) {
                return ['name' => $key, 'value' => $this->unpacking($data->value), 'lifetime' => $data->lifetime];
            } else {
                $this->remove($key);
            }
        }
    }
170730
public static function has( $key )
	{
		$cache = self::instance();
		if ( $cache ) {
			return $cache->isExisting( $key );
		}
		return false;
	}
1132382
public static function has($data, $key)
    {
        if (self::isArrayAccess($data)) {
            return array_key_exists($key, $data);
        }
        if (!is_object($data)) {
            return false;
        }
        if (method_exists($data, 'get' . $key)) {
            return true;
        }
        if (method_exists($data, 'get' . str_replace('_', '', $key))) {
            return true;
        }
        if (isset($data->$key)) {
            return true;
        }

        return false;
    }
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;
    }
1346603
public function exists($key) {

        $stmt = $this->connection->query("SELECT `key` FROM ".$this->table." WHERE `key`='{$key}';");
        $res  = $stmt->fetch(\PDO::FETCH_ASSOC);

        return isset($res["key"]);
    }
1068573
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = file_exists($this->file($key));

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

        return $has_key;
    }
148906
public function has($key)
    {
        $result = array_key_exists($key, $this->data);
        if (!$result && $this->isDotNotation($key)) {
            $result = true;
            $keys = explode('.', $key);
            $data = $this->data;

            foreach ($keys as $key) {
                if (!is_array($data) || !array_key_exists($key, $data)) {
                    $result = false;
                    break;
                }

                $data = $data[$key];
            }
        }

        return $result;
    }
162179
public function has($key): bool
    {
        return isset($this->items[$key]) || array_key_exists($key, $this->items);
    }
1226182
public function exists($key) {
        $key = $this->_encrypt($key);
        $fn = $this->_storage_path . $key;
       
        // Cache janitor for filesystem will be moved here
        if (file_exists($fn)) {
            $contents = file_get_contents($fn);
            
            if (!base64_decode($contents, true)) {
                unlink($fn);
                return;
            }

            $data = unserialize(base64_decode($contents, true));
            // Will check for expiration
            if (isset($data['date_created']) && isset($data['ttl']) && isset($data['data'])) {
                if (time() - (int)$data['date_created'] >= $data['ttl']) {
                    unlink($fn);
                }
            } else {
                unlink($fn);
            }
        }

        return file_exists($fn);
    }
194418
public function exists($key)
    {
        // Checks if we need to verify a nested array
        if (preg_match('/\.+/', $key))
        {
            $keys   = explode('.', $key);
            $levels = count($keys);

            // Quick workaround
            if ($levels == 4)
            {
                return isset($this->params[$keys[0]][$keys[1]][$keys[2]][$keys3]);
            }
            else if ($levels == 3)
            {
                return isset($this->params[$keys[0]][$keys[1]][$keys[2]]);
            }
            else
            {
                return isset($this->params[$keys[0]][$keys[1]]);
            }
        }

        // Non-nested array validation
        if (array_key_exists($key, $this->params))
        {
            return true;
        }

        return false;
    }
69348
public function has($key)
    {
        return $this->enabled && $this->filesystem->exists($this->cacheDir.$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);
    }