src/ValidationSubscriber.php
private function createRevalidationRequest(
        RequestInterface $request,
        ResponseInterface $response
    ) {
        $validate = clone $request;
        $validate->getConfig()->set('cache.disable', true);
        $validate->removeHeader('Pragma');
        $validate->removeHeader('Cache-Control');
        $responseDate = $response->getHeader('Last-Modified')
            ?: $response->getHeader('Date');
        $validate->setHeader('If-Modified-Since', $responseDate);

        if ($etag = $response->getHeader('ETag')) {
            $validate->setHeader('If-None-Match', $etag);
        }

        return $validate;
    }
private function createRevalidationRequest(
        RequestInterface $request,
        ResponseInterface $response
    ) {
        $validate = clone $request;
        $validate->getConfig()->set('cache.disable', true);
        $validate->removeHeader('Pragma');
        $validate->removeHeader('Cache-Control');
        $responseDate = $response->getHeader('Last-Modified')
            ?: $response->getHeader('Date');
        $validate->setHeader('If-Modified-Since', $responseDate);

        if ($etag = $response->getHeader('ETag')) {
            $validate->setHeader('If-None-Match', $etag);
        }

        return $validate;
    }
private function createRevalidationRequest ( RequestInterface $ request , ResponseInterface $ response ) { $ validate = clone $ request ; $ validate -> getConfig ( ) -> set ( 'cache.disable' , true ) ; $ validate -> removeHeader ( 'Pragma' ) ; $ validate -> removeHeader ( 'Cache-Control' ) ; $ responseDate = $ response -> getHeader ( 'Last-Modified' ) ? : $ response -> getHeader ( 'Date' ) ; $ validate -> setHeader ( 'If-Modified-Since' , $ responseDate ) ; if ( $ etag = $ response -> getHeader ( 'ETag' ) ) { $ validate -> setHeader ( 'If-None-Match' , $ etag ) ; } return $ validate ; }
Creates a request to use for revalidation.

@param RequestInterface  $request  Request
@param ResponseInterface $response Response to validate

@return RequestInterface returns a revalidation request
Creates a request to use for revalidation .