-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CacheKeyResolver fromFieldArguments does not work #821
Comments
Are you sure that the key is returned by |
What do you mean correct cache key? it returns the key that I compose there every time.
|
My concern is that the key that generated internally doesn't match with your logic in Have you tried to leave |
I did try with CacheKey.NO_KEY, had no luck, This is the query
I thought that the cachekeyresolver's purpose was for me to set my own logic for how the key is composed and what it contains. What kind of key does it generate internally? |
In your case you shouldn't use When this query is cached the key for the root will be quite complicated, like Could you elaborate on why |
it seems it returns twice when there is something in cache and once when it isn't, when it is called twice it returns once from cache and once from network.
My ResponseFetcher is CACHE_FIRST, it shouldn't return from network when it finds cache I ran some additional tests, to make sure of the findings, and added a button that only does the query, it returns consistently from the network, so no cache results, not sure why in the normal flow sometimes it returns that it finds in cache paired with a not found in cache, something weird happens behind the scenes |
Are you sure that the response was cached previously? I think one take away from this conversation is that we need have the way to dump the cache, at least the mem cache. It will be easier to handle such issues |
well I don't know how to check if it was cached, but if i make the same query twice in a row, the second time should be from cache right? |
Is there any way I can try your query? Is GraphQL endpoint public exposed? |
I've prepared PR #825 to be able dump the content of normalized cache. |
No unfortunately it is not public, so I can't give you access. I will wait till a snapshot is up with that PR, and see what it turns out in it |
Please try on new version if you still see the same issue pls reopen this issue again. |
This issue is still there |
I have a cachekeyresolver that looks like:
from fieldRecordSet it works perfectly, but the arguments one does not, it returns the proper key, but the response is still fetched from network and not from the cache
The text was updated successfully, but these errors were encountered: