I’ve came across a few problem in Cloudflare Cache management.
vary — Cloudflare does not consider vary values in caching decisions.
As confirmed by the support, in this docuementation “vary” refers to the “Vary” header since there is no “vary” directive for HTTP 1.1 Cache-Control : RFC 7234 - Hypertext Transfer Protocol (HTTP/1.1): Caching
This mean that Cloudflare is not compatible with RFC7231 which mean that Cloudflare is not HTTP 1.1 compliant since RFC define this feature as MUST have and not SHOULD have :
An origin server might send Vary with a list of fields for two
- To inform cache recipients that they MUST NOT use this response
to satisfy a later request unless the later request has the same
values for the listed fields as the original request
And therefor Cloudflare is not HTTP2 compatible :
HTTP’s existing semantics remain unchanged.
My API is responding with Vary: range because the same URL respond with different answers based on the range header value sent by the client. If I enable the “cache everything” option two queries with different range client headers returns the same answer.