You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Responses with status codes that are defined as cacheable by default (e.g., 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501 in this specification) can be reused by a cache with heuristic expiration unless otherwise indicated by the method definition or explicit cache controls [RFC7234]; all other status codes are not cacheable by default.
Some proxies (including CDNs) choose not to cache responses with no cache-control header. Others do.
Expected Outcome
apollo-server returns a Cache-Control header for all responses. One possible default would be max-age=0, no-store.
In case you don't want to wait for a fix here, shameless plug:
I created a dedicated GraphQL CDN where this is fixed - https://graphcdn.io
We send private, no-store in these cases to make it explicit.
Background
apollo-server@2.10.0
When
cacheControl.defaultMaxAge == 0
and a resource does not include the@cacheControl
directive, apollo-server returns noCache-Control
header.RFC7231, §6.1 says,
Some proxies (including CDNs) choose not to cache responses with no
cache-control
header. Others do.Expected Outcome
apollo-server returns a
Cache-Control
header for all responses. One possible default would bemax-age=0, no-store
.See Also
The text was updated successfully, but these errors were encountered: