-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
Description
I am seeing a difference in caching behaviour between using $response->setVary(["Accept-Encoding", "X-Foo-A", "X-Foo-B"]); v/s using $response->setVary("Accept-Encoding, X-Foo-A, X-Foo-B");
The first one sends the correct Vary headers, but does not actually cache it.. if I try querying the same URL with a different value for one of the headers, it gives me the same cached response with a cache HIT instead of missing it. Basically the Vary header response seems to be sent, but is not taking an actual effect on the Caching rules.
BUT, the second one works as expected. Querying the same URL with a different value for one of the vary headers gives a Cache Miss.
I am using symfony's app cache for testing.
Notes on my setup:
- I am using Symfony's HTTP Cache Kernel
- I am using FOSRestBundle
- I am using Postman to create / inspect the response
- Using symfomy 2.4