-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
| Q | A |
|---|---|
| Bug report? | yes |
| Feature request? | no |
| BC Break report? | no |
| RFC? | yes |
| Symfony version | 3.4 |
Prolog
The ResponseCacheStrategy::update() method makes all responses uncacheable if one of the embedded responses is not cacheable:
symfony/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
Lines 75 to 77 in f004895
| if (!$response->isFresh()) { | |
| $this->cacheable = false; | |
| } |
Note that $this->cacheable is never set to true again.
Current behavior
This together with #18164 prevents the main response from being cached by the client if there is an embedded response. My web page is delivered with must-revalidate, no-cache, private although I have specified max-age: 1800.
Expected behavior
I would have expected the main response (the web page) to be cacheable by the client (max-age=1800, …). Is this the intended behavior or is it a bug?