public function isCached(CacheItemInterface $item = null)
    {
        if (!$item) {
            $key = $this->getCurrentKey();
            $item = $this->getItemStorage()->get($key);
        }

        return $item ? true : false;
    }
public function isCached(CacheItemInterface $item = null)
    {
        if (!$item) {
            $key = $this->getCurrentKey();
            $item = $this->getItemStorage()->get($key);
        }

        return $item ? true : false;
    }
public function isCached ( CacheItemInterface $ item = null ) { if ( ! $ item ) { $ key = $ this -> getCurrentKey ( ) ; $ item = $ this -> getItemStorage ( ) -> get ( $ key ) ; } return $ item ? true : false ; }
Checks if current page is in cache.

@param \PageCache\Storage\CacheItemInterface|null $item

@return bool Returns true if page has a valid cache file saved, false if not
@throws \Psr\SimpleCache\InvalidArgumentException
Checks if current page is in cache .