Check if a key exists into memcache(d)
/!\ Not work if the correct value is the boolean false /!\

@param string $key The memcache(d) key to check

@return boolean

@throws \Exception If the key is not a string
972886
public function ifExists(string $key): bool
    {
        if ($this->get($key) === false) {
            return false;
        }

        return true;
    }
230605
public function containsKey($key): bool {
        $node = $this->getHead();
        while (null !== $node) {
            if (Comparator::equals($node->getKey(), $key)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
788658
public function get($key)
    {
        $value = $this->memcached->get($key);

        return is_array($value) ? $value[0] : $value;
    }
716356
public function fetch( $key )
    {
        if ( strlen( $key ) > self::MAX_KEY_LENGTH )
        {
            throw new ezcCacheInvalidKeyException( $key, 'Length > ' . self::MAX_KEY_LENGTH . '.' );
        }

        $data = $this->memcache->get( $key );
        return ( is_object( $data ) ) ? $data->var : false;
    }
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);
    }
291026
public function get($key)
    {
        if (!$this->hasConnection()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        try {
            return $this->memcache->get($key);
        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }
76220
public function has($key)
	{
		return $this->engine->get($this->id($key)) !== false || $this->engine->getResultCode() != \Memcached::RES_NOTFOUND;
	}
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;
    }
379742
public function exists(string $key) : bool
    {
        $this->checkCallback();
        return isset($this->members[$key]);
    }
118404
public function deleteByKey(string $key): bool
    {
        if (!$this->users_id) {
            throw new Exception('No users is set to save config');
        }

        if ($config = $this->findFirst(['conditions' => 'users_id = ?0 and name = ?1', 'bind' => [$this->users_id, $key]])) {
            return $config->delete();
        }

        return false;
    }
997641
public function get($key)
	{
		if ($value = $this->memcache->get($this->prefix.$key)) {
		    return $value;
		}
	}
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);
    }
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;
    }
582406
protected function getCache($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }
        return false;
    }
1293869
public function has($key)
    {
        if (null === $key) {
            throw new Exception\InvalidArgumentException('The specified key name is null');
        }

        if (!is_scalar($key)) {
            throw new Exception\InvalidArgumentException('The specified key name must be a scalar');
        }

        return array_key_exists($key, $this->collections);
    }
985341
public static function get($key) {
		$memory = self::fetch();
		if (isset($memory->$key)) {
			return $memory->$key;
		} else {
			throw new \Exception('Object not in cache');
		}
	}
759919
protected function exists($key)
    {
        if (!array_key_exists($key, $this->items)) {
            // key not in cache
            return false;
        }

        $expire = $this->items[$key][1];
        if ($expire !== 0 && $expire < time()) {
            // not permanent & already expired
            $this->size -= strlen($this->items[$key][0]);
            unset($this->items[$key]);

            return false;
        }

        $this->lru($key);

        return true;
    }