Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
Cache-Control: public, max-age=20000 so the behaviour is consistent with the CacheControlAttribute.Scope default value, or
Cache-Control: max-age=20000 since no default scope was defined, or
A way to configure a default scope like DefaultMaxAge
What is actually happening?
Response with header Cache-Control: private, max-age=20000, with no way to change or remove the private scope for queries without CacheControlAttribute and using the DefaultMaxAge.
This makes the option of DefaultMaxAge unusable for projects where we want the default scope to be public.
Product
Hot Chocolate
Version
13.8.1
Link to minimal reproduction
https://github.com/kiangkuang/HotChocolateDemo
Steps to reproduce
bookWithDefaultCacheControl
query, which has noCacheControlAttribute
and will use the value fromDefaultMaxAge
defined in https://github.com/kiangkuang/HotChocolateDemo/blob/1e3239dd7d37ef78ab9cc5cc5fabecd7912cf1be/Program.cs#L9What is expected?
Response with header
Cache-Control: public, max-age=20000
so the behaviour is consistent with theCacheControlAttribute.Scope
default value, orCache-Control: max-age=20000
since no default scope was defined, orDefaultMaxAge
What is actually happening?
Response with header
Cache-Control: private, max-age=20000
, with no way to change or remove theprivate
scope for queries withoutCacheControlAttribute
and using theDefaultMaxAge
.This makes the option of
DefaultMaxAge
unusable for projects where we want the default scope to be public.Relevant log output
No response
Additional context
No response