I'm trying to build a PWA that will store about 1GB of Redux state and found a number of offline storage options and have come down to these two: Cache API and Storage API. This partially answers my questions around storage options provided by the browser. My understanding of the Storage API is that it's meant to be a one-stop shop for all storage needs, but was wondering when using the persist method on it, does that mean I don't need to think of the Cache API anymore since it's subsumed by the Storage API?
EDIT: I found this article as well saying that Cache API when used with a service worker is ideal for static assets while IndexedDB is advised for all else like JSON. I also seemed to have picked up that the Storage API is only used for toggling persistence, but it doesn't do the caching itself. So I would need to still use the API of one of the storage options. But doesn't the Cache API already come with saving out of the box, rendering the use of Storage API redundant?
On top of this, I understood localstorage and sessionstorage to have a hard size limit of 5MB each, but now I'm reading 6%? If the specs changed from 5MB to 6%, it would be nice for that context to be included.
Why is all the documentation on this so unclear about everything?!?