Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sowlutions/react-native-clear-cache
React Native - Clear app cache
https://github.com/sowlutions/react-native-clear-cache
clear-cache react-native
Last synced: 2 months ago
JSON representation
React Native - Clear app cache
- Host: GitHub
- URL: https://github.com/sowlutions/react-native-clear-cache
- Owner: sowlutions
- Created: 2019-10-15T11:56:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-06T06:28:42.000Z (about 4 years ago)
- Last Synced: 2024-04-23T16:21:34.906Z (9 months ago)
- Topics: clear-cache, react-native
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 30
- Watchers: 2
- Forks: 28
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-clear-cache
This app is a clone of [react-native-clear-app-cache](https://github.com/midas-gufei/react-native-clear-app-cache/) but transformed to work with RN 0.60+
## Getting started
Add to your package.json:
`"react-native-clear-cache": "sowlutions/react-native-clear-cache"`
### Mostly automatic installation
No need to link as of RN 0.60.
## Usage
```javascript
import ClearCache from 'react-native-clear-cache';// get the storage usage
ClearCache.getAppCacheSize(data => {
alert(data) // will show the App's storage usage in the app's cache.
});// clear the storage
ClearCache.clearAppCache(data => {
alert(data) // will alert the new size
});
```