react-native-filecache
react-native file caching helper.
Feature
- Caching remote files.
- Manage caches you created.
Usage
fetch
const response = await FileCacheconst blob = responseconst text = responsetext
cache
const cacheObj = await FileCache// { id: 'cache_id_as_string', path: '/absolute/path/to_native_cached_file' }console
TODO: cache with tag
const cacheObj = await FileCache// { tag: 'tag-1', id: 'cache_id_as_string', path: '/absolute/path/to_native_cached_file' }console
TODO: clearAll
await FileCache
TODO: clear
await FileCacheclearcacheObj
TODO: clear tagged
await FileCache
Install
# install npm install react-native-filecache# link in your project react-native link react-native-filecache
TODO
- Cache with tag.
- Remove tagged caches at once.
Author
Yusuke Shibata
Licence
MIT