Does router have support for caching objects/fields? #1349
-
I am trying to work with the cacheControl directive in my downstream sub-services and returning extensions: {"cacheControl": Object({"version": Number(1), "hints": Array([Object({"path": Array([String("brands")]), "maxAge": Number(10), "scope": String("PUBLIC")})])} in the SubgraphResponse. as the graphQL documentation suggests (which i just found today as well) What does the router do with this information if anything? I was hoping that it would cache the results and when a subsequent request comes on the same path with same arguments, it would serve result from cache? Is there configuration that needs to set in the router? do i need to set cache-control headers as well?? I could never get the cache to work on the apollo gateway (node) either and could never figure it out... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Caching is not already well addressed in the router, but it's one of our hot topics and we definitely want to fix that. For example here is a list of issues we have to fix to improve the caching experience in the router https://github.com/apollographql/router/issues?q=is%3Aissue+is%3Aopen+label%3Acache+ Currently cacheControl directive is not supported |
Beta Was this translation helpful? Give feedback.
Caching is not already well addressed in the router, but it's one of our hot topics and we definitely want to fix that. For example here is a list of issues we have to fix to improve the caching experience in the router https://github.com/apollographql/router/issues?q=is%3Aissue+is%3Aopen+label%3Acache+
Currently cacheControl directive is not supported