-
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.
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.
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