lisaogren / axios-cache-adapter

Caching adapter for axios. Store request results in a configurable store to prevent unneeded network requests.
MIT License
725 stars 108 forks source link

Improve documentation around using localForage drivers with axios-cache-adapter #233

Open ahayes91 opened 3 years ago

ahayes91 commented 3 years ago

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?

nql5161 commented 3 years ago

Were you able to find a solution for this?

ahayes91 commented 3 years ago

@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: