Replies: 2 comments
-
We haven't run a lot of experiments yet, so @StevenLangbroek may know more as he works on a project that uses more offline data than what needs be personally tested. This comes down to our default storage engine. This engine keeps a limited set of data around for a limited set of time. There's no problem with persisting the data forever however as long as you take that into account. You can implement patterns like the The only limitations that you'll encounter are:
So overall you should be ready to go, but I'd advise you to run some tests on how the storage behaves and what the load times look like, so you can optimise for those first. |
Beta Was this translation helpful? Give feedback.
-
@mrflip May I ask what you finally did ? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'd like to use the offline caching in React Native. I may do this on top of expo's SQLite support. It seems fairly straightforward, but before I dive in I'm wondering if anyone has already implemented a storage engine for SQLite or otherwise that will work in react native? I'd rather not use the async storage as that has size limitations.
Also, I'd be doing this primarily for speed up: our app is pretty read-heavy, it will be carrying around static catalogs with 10,000's of rarely changing objects and a small number of invoices. Would graphcache with offline support on top of a SQLite db let me read large parts of the catalog in, or is it more just for patching over small amounts of data while awaiting a cell signal?
Lastly, if I did implement this, is it something you'd consider pulling in to mainline URQL, or should I create a separate project for it? I'm assuming it would be about as long and about as straightforward as the single-file default storage engine is.
Beta Was this translation helpful? Give feedback.
All reactions