src/Driver/Base/FileCache.php
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');
        }

        if ($this->getRaw($key)) {
            return true;
        }

        return false;
    }
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');
        }

        if ($this->getRaw($key)) {
            return true;
        }

        return false;
    }
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' ) ; } if ( $ this -> getRaw ( $ key ) ) { return true ; } return false ; }
Whether an item is present in the cache.

@param string $key The cache item key.

@throws \Psr\SimpleCache\InvalidArgumentException

@return bool
Whether an item is present in the cache .