Skip to content

Commit

Permalink
Moved to Yarn and transformed to own package
Browse files Browse the repository at this point in the history
  • Loading branch information
Duell10111 committed Jul 12, 2021
1 parent 4c44c9b commit 2490cad
Show file tree
Hide file tree
Showing 4 changed files with 4,252 additions and 6,720 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# react-native-cache
# @duell10111/react-native-cache

LRU cache built on top of the [React Native communities' AsyncStorage v2](https://github.com/react-native-community/async-storage/tree/master) (or included MemoryStore) and automatic pruning of least recently used items.

Based on timfpark's version

## Installation

* Run the following command.

```shell
npm install --save react-native-cache
npm install --save @duell10111/react-native-cache
or
yarn add @duell10111/react-native-cache
```

* Import the library.
Expand All @@ -27,7 +31,8 @@ const cache = new Cache({
maxEntries: 50000, // if unspecified, it can have unlimited entries
stdTTL: 0 // the standard ttl as number in seconds, default: 0 (unlimited)
},
backend: AsyncStorage
backend: AsyncStorage,
prunecallback: (keys) => {console.log(keys)} //prunecallback called if a key gets removed
});
```

Expand Down
Loading

0 comments on commit 2490cad

Please sign in to comment.