-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
request-policy-exchange behavior differs between dev & production #3462
Comments
No reproduction needed here indeed! Nice catch. We haven't kept track of this exchange as much as we should have, so i'll get on that and will see what we can do. It might be worth evaluating at the same time whether this exchange should be expanded to include more logic. |
Locally I modified this exchange to use localStorage rather than be in memory, so that the ttl persists across multiple sessions. What I've done locally is remove a key when it should be upgraded and my set will only set if there is no key. This keeps it from impacting the intended ttl and doesn't require meta to exist either:
I could open up a PR to support an optional storage get/set/remove like the above allowing for any storage mechanism. |
Hey, folks. I know this was closed long ago, but in the @urql/core distributive files, I still see this condition that prevents setting meta cache outcome in the production environment. I'm using the version
|
I think I have found the culprit - the babel transformer and fixed it in this PR. |
Describe the bug
The exchange has this basic logic:
meta
does not exist in production (as mentioned #3439) resulting in this always being viewed as a miss. This will keep a request alive much longer than anticipated and won't be the same behavior between dev and production.Reproduction
Is this needed here?
Urql version
4.0.6, core 4.2.2
Validations
The text was updated successfully, but these errors were encountered: