src/Cache/FileStore.php
public function isValid(string $key) : bool
    {
        $key  = $this->getActualCacheKey($key);
        $meta = $this->getCacheContents()[$key] ?? [];

        if (empty($meta['expires_at'])) {
            return false;
        }

        return Carbon::now() < Carbon::createFromFormat(self::RFC_7231, $meta['expires_at']);
    }
public function isValid(string $key) : bool
    {
        $key  = $this->getActualCacheKey($key);
        $meta = $this->getCacheContents()[$key] ?? [];

        if (empty($meta['expires_at'])) {
            return false;
        }

        return Carbon::now() < Carbon::createFromFormat(self::RFC_7231, $meta['expires_at']);
    }
public function isValid ( string $ key ) : bool { $ key = $ this -> getActualCacheKey ( $ key ) ; $ meta = $ this -> getCacheContents ( ) [ $ key ] ?? [ ] ; if ( empty ( $ meta [ 'expires_at' ] ) ) { return false ; } return Carbon :: now ( ) < Carbon :: createFromFormat ( self :: RFC_7231 , $ meta [ 'expires_at' ] ) ; }
Check if cache is still valid.

@param string $key

@return bool
Check if cache is still valid .