Skip to content

Does SWR cache persist on page reload ? #592

Answered by sergiodxa
jeremytenjo asked this question in General
Discussion options

You must be logged in to vote

It doesn't, it's all in-memory, but you can use swr-sync-storage to keep your SWR cache synced with localStorage or sessionStorage and it will hydrate your cache from there when your app load.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jeremytenjo
Comment options

@demian85
Comment options

@sergiodxa
Comment options

Answer selected by jeremytenjo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants