Using DiskCache for Android and non-deadlocking parallel PINCache for iOS, this library provides a simple interface to store data in a key-value format for offline mode.
- Requires
iOS 12
for iOS
yarn add @candlefinance/cache
npm i @candlefinance/cache
- Add to your target in your Podfile if you get an error
pod 'PINCache', :modular_headers => true
Currently max size on iOS is 50MB and 200MB on Android.
await write('key', 'value');
const result = await read('key'); // can be undefined if key doesn't exist
await remove('key');
await clear();
Join our Discord and ask questions in the #oss channel.
MIT