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
We are actively using Apollo, and the Rest Data Source with Redis as our overall cache for some legacy APIs. We have quite a few GET Api's that we never want cached, that return correct no-cache headers, and to be explicit we have also set the cacheOptions ttl to zero.
However, we can still see a lot of un-necessary MGET url in our logs, due to the code:
This code means that it will always check the cache for every request that is not a HEAD.
Would you consider a PR that if the ttl has been manually set to zero, it should not check the cache for values, or perhaps an additional explicit value so as not to break existing behaviour? Something along the lines of:
We are actively using Apollo, and the Rest Data Source with Redis as our overall cache for some legacy APIs. We have quite a few GET Api's that we never want cached, that return correct no-cache headers, and to be explicit we have also set the
cacheOptions
ttl to zero.However, we can still see a lot of un-necessary
MGET url
in our logs, due to the code:https://github.com/apollographql/datasource-rest/blob/main/src/HTTPCache.ts#L78
This code means that it will always check the cache for every request that is not a
HEAD
.Would you consider a PR that if the ttl has been manually set to zero, it should not check the cache for values, or perhaps an additional explicit value so as not to break existing behaviour? Something along the lines of:
This would avoud (for us at least) hundreds of thousands of pointless MGET requests to our cache!
The text was updated successfully, but these errors were encountered: