src/Utils.php
public static function canCacheRequest(RequestInterface $request)
    {
        $method = $request->getMethod();

        // Only GET and HEAD requests can be cached
        if ($method !== 'GET' && $method !== 'HEAD') {
            return false;
        }

        // Don't fool with Range requests for now
        if ($request->hasHeader('Range')) {
            return false;
        }

        return self::getDirective($request, 'no-store') === null;
    }
public static function canCacheRequest(RequestInterface $request)
    {
        $method = $request->getMethod();

        // Only GET and HEAD requests can be cached
        if ($method !== 'GET' && $method !== 'HEAD') {
            return false;
        }

        // Don't fool with Range requests for now
        if ($request->hasHeader('Range')) {
            return false;
        }

        return self::getDirective($request, 'no-store') === null;
    }
public static function canCacheRequest ( RequestInterface $ request ) { $ method = $ request -> getMethod ( ) ; // Only GET and HEAD requests can be cached if ( $ method !== 'GET' && $ method !== 'HEAD' ) { return false ; } // Don't fool with Range requests for now if ( $ request -> hasHeader ( 'Range' ) ) { return false ; } return self :: getDirective ( $ request , 'no-store' ) === null ; }
Default function used to determine if a request can be cached.

@param RequestInterface $request Request to check

@return bool
Default function used to determine if a request can be cached .