react-native-caches
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-caches

Weekly Downloads

8

Version

1.2.0

License

MIT

Unpacked Size

29.9 kB

Total Files

16

Last publish

Collaborators

  • jeremaihloo