Skip to content

Invalidate cache periodically #3623

Answered by kitten
lsarni asked this question in Q&A
Discussion options

You must be logged in to vote

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 changing Clients 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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lsarni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants