Skip to content

HttpCache does not merge directive no-store is correctly #28872

@Toflar

Description

@Toflar

Symfony version(s) affected: all

Description
When you have subrequests in your application and one of them sets the no-store Cache-Control directive, it will not make it to the client.
This is due to the ResponseCacheStrategy ignoring this attribute here: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php#L80

How to reproduce

Have a master request with no-store and an additional ESI request with no-store. The final response will have no no-store cache control directive.

Possible Solution

Well, the PR that would solve this issue is open for a while: #26532
It correctly treats all the different cache control directives. This should've been merged a while ago 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions