-
Is there a way to invalidate the cache periodically? For example, every 24 hours. We only read data from a third party, and don't do any mutations on it. We know how often we should update it, but that's it. |
Beta Was this translation helpful? Give feedback.
Answered by
kitten
Jun 25, 2024
Replies: 1 comment
-
The easiest way to do this is to re-create the Alternatively, we do have an example TTL-refetch approach here too: https://github.com/urql-graphql/urql/tree/main/exchanges/request-policy |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lsarni
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The easiest way to do this is to re-create the
Client
periodically and let your app reactively respond to that. All of our bindings are set up to react to changingClient
s and hence they'll also re-execute all operations on screen.Alternatively, we do have an example TTL-refetch approach here too: https://github.com/urql-graphql/urql/tree/main/exchanges/request-policy