Back with another weird caching question. Does Apo...
# apollo-kotlin
f
Back with another weird caching question. Does Apollo have a sort of etag-like concept where the server can tell us "go ahead and use the cache"? Also I see some mention on the internets of there being a
@cache
directive in the schema maybe? But I'm not finding official docs on it. Does the ApolloClient do anything with the
@cacheControl
directive?
m
Nothing like that at the moment. There have been thoughts about using the HTTP
maxAge
header (set from the server using
@cacheControl
(doc)) alas it's hard to fit in a normalized cache where HTTP requests overlap and the maxAge needs to be per field and not per response
f
awesome thank you!
👍 1
a
Also any fine grained caching would have to be on a per subgraph basis as the data could have wildly different cache times. For example at my company we have pricing that could change minute to minute but it’s bundled back with other product data ina a single GraphQL call. How do you know that data would remain up to date top level?
💯 1