I am using Redux Persist and LocalForage in my web application. I have a series of actions that are fired upon login that update some data about the user. The IndexedDB size after all actions are fired and the data is saved in the JSON format on indexedDB is ~1.4Mb.
However if I refresh the page thus triggering again the actions, or if log out and back in, even though the values inside IndexedDB DO NOT change (I have double checked with a JSON diff tool), the size of the storage keeps on growing. Eventually Chrome will clear some of it after it grows for a few MBs, but not going back to the initial correct size.
The IndexedDB JSON is exactly the same, no differences whatsoever, but huge difference in size. Does anyone know why this is happening and how can I prevent it? I also would like to know when/how often Chrome clears whatever data it is that is cluttering my IndexedDB, but I haven't been able to find any reference for it.
Thanks a lot