apollo-server
apollo-server copied to clipboard
add option for s-maxage inside cacheControl
Hi Guys,
I use deployment on Zeit now. I would like to set the s-maxage
to enable CDN response but it seems this option is not available. It would be great if cacheControl
would be more flexible to set this option.
Especially options like stale-while-revalidate
would be great to add.
Thanks
any update on this?
We've just implemented a patch to do this but it would be nice if it could be native
Do you want to be able to specify the s-maxage
separately from max-age
(with corresponding @cacheControl(sharedMaxAge: 100)
etc) or just to be able to make the existing @cacheControt(maxAge: )
set s-maxage
instead?
I would say separate is more flexible and allows for fine tuning specific types if possible
That's fair. I think this is a reasonable idea but will take some thought to decide if we need to be adding it to all the ways we represent a cache policy.
If there's any way I can help testing and/or brainstorming let me know