1.2.0 • Published 3 years ago
react-native-caches v1.2.0
react-native-caches
A package to get cache size and clear caches.
Installation
yarn add react-native-caches
Usage
import Caches from 'react-native-caches'
const fetchInfo = async () => {
const info = await Caches.getCacheSize()
console.log('fetchInfo', info)
setCacheSize(info.cacheSize)
setCacheUnit(info.unit)
}
const clearCache = async () => {
await Caches.runClearCache()
await fetchInfo()
}
TODO
- Add android support
- Add ios support