You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
I'm using axios-cache-adapter for client-side caching, and I'm updating our instance to use a localForage store instead of relying on in-memory storage. https://www.npmjs.com/package/axios-cache-adapter#use-localforage-as-cache-store has some code examples on creating the localForage store to be used with axios-cache-adapter, and the example provided specifically excludes localforage.WEBSQL as a driver from the list. I tried using localforage.WEBSQL on its own as the driver for my own implementation of axios-cache-adapter for kicks, and found that the caching didn't work on MacOS Chrome at all with WebSQL.
Is this a known issue with axios-cache-adapter & WebSQL?
Any chance we can improve the documentation around the driver setting, and perhaps explain the use of the memoryDriver from localforage-memoryStorageDriver?
The text was updated successfully, but these errors were encountered:
@nql5161 nope, couldn't get WebSQL working so we ended up using LocalStorage as the driver. Here are the general findings I documented internally before I had to move on:
WebSQL didn't seem to work at all for caching requests in Chrome & MacOS when we tried it on its own (all network calls were being repeated, even if the maxAge of the request was greater than 0).
IndexedDB was quite reliable on Chrome, Safari, Firefox on Mac OS, and on Chrome, Firefox, and Edge on Windows, but didn't support database cleanup very well. We spent a lot of time on this one:
We tried to use dropInstance method on logout to delete the databases, but it made the logout process several seconds longer and significantly decreased UI performance in redirecting the user back to the login screen. (This may be something specific to our implementation of a logout mechanism though.)
It didn't support multiple tab browser sessions on the same store (the second tab would hang completely and network requests that needed to go through the store couldn't be completed).
LocalStorage is always the fallback for Firefox in private mode, as IndexedDB isn't supported in private mode.
localforage-memoryStorageDriver in-memory storage is the fallback in case any older versions of browsers don't support localStorage (i.e. network calls will still be cached, but you can't view the cache in the browser in the Storage pane of developer tools).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using axios-cache-adapter for client-side caching, and I'm updating our instance to use a localForage store instead of relying on in-memory storage.
https://www.npmjs.com/package/axios-cache-adapter#use-localforage-as-cache-store has some code examples on creating the localForage store to be used with axios-cache-adapter, and the example provided specifically excludes localforage.WEBSQL as a driver from the list. I tried using
localforage.WEBSQL
on its own as the driver for my own implementation of axios-cache-adapter for kicks, and found that the caching didn't work on MacOS Chrome at all with WebSQL.Is this a known issue with axios-cache-adapter & WebSQL?
Any chance we can improve the documentation around the driver setting, and perhaps explain the use of the memoryDriver from
localforage-memoryStorageDriver
?The text was updated successfully, but these errors were encountered: