MatthiasMullie\Scrapbook\Psr16\SimpleCache::has PHP Method

has() public method

public has ( $key )
    public function has($key)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException('Invalid key: ' . serialize($key) . '. Must be string.');
        }
        // KeyValueStore::get returns false for cache misses (which could also
        // be confused for a `false` value), so we'll check existence with getMulti
        $multi = $this->store->getMulti(array($key));
        return isset($multi[$key]);
    }