src/Service/CacheKeyBuilder/EtagHasher.php
public function hash(Response $response)
    {
        $params = [
            $response->getLastModified()->format(\DateTime::ISO8601),
        ];

        // add cookies to ETag
        if ($this->request_stack->getMasterRequest()) {
            $params[] = http_build_query($this->request_stack->getMasterRequest()->cookies->all());
        }

        return hash($this->algorithm, implode(self::ETAG_SEPARATOR, $params));
    }
public function hash(Response $response)
    {
        $params = [
            $response->getLastModified()->format(\DateTime::ISO8601),
        ];

        // add cookies to ETag
        if ($this->request_stack->getMasterRequest()) {
            $params[] = http_build_query($this->request_stack->getMasterRequest()->cookies->all());
        }

        return hash($this->algorithm, implode(self::ETAG_SEPARATOR, $params));
    }
public function hash ( Response $ response ) { $ params = [ $ response -> getLastModified ( ) -> format ( \ DateTime :: ISO8601 ) , ] ; // add cookies to ETag if ( $ this -> request_stack -> getMasterRequest ( ) ) { $ params [ ] = http_build_query ( $ this -> request_stack -> getMasterRequest ( ) -> cookies -> all ( ) ) ; } return hash ( $ this -> algorithm , implode ( self :: ETAG_SEPARATOR , $ params ) ) ; }
@param Response $response

@return string
@param Response $response