All Projects β†’ tiaanduplessis β†’ react-native-modest-cache

tiaanduplessis / react-native-modest-cache

Licence: MIT license
πŸ’Ύ Simple cache for AsyncStorage

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-modest-cache

nestjs-throttler-storage-redis
Redis storage provider for the nestjs-throttler package.
Stars: ✭ 56 (+143.48%)
Mutual labels:  storage
js-cfb
πŸ’Ύ OLE File Container Format
Stars: ✭ 54 (+134.78%)
Mutual labels:  storage
stoor
Storage wrapper with support for namespacing, timeouts and multi get/set and remove.
Stars: ✭ 26 (+13.04%)
Mutual labels:  storage
esop
Cloud-enabled backup and restore tool for Apache Cassandra
Stars: ✭ 40 (+73.91%)
Mutual labels:  storage
CodablePersist
Store and Cache Anything Codable
Stars: ✭ 18 (-21.74%)
Mutual labels:  storage
talisman
Talisman helps with upgrade and wipe of a Portworx cluster on Kubernetes
Stars: ✭ 13 (-43.48%)
Mutual labels:  storage
CHKV
Consistent Hashing based Key-Value Memory Storage
Stars: ✭ 20 (-13.04%)
Mutual labels:  storage
gcsfs
Google Cloud Storage filesystem for PyFilesystem2
Stars: ✭ 36 (+56.52%)
Mutual labels:  storage
xd-storage-helper
A little helper to make storing key-value-pairs (e.g. settings) for Adobe XD plugins easier.
Stars: ✭ 22 (-4.35%)
Mutual labels:  storage
CarryCapacity
Vintage Story mod which adds the capability to carry blocks in-hand and on your back
Stars: ✭ 17 (-26.09%)
Mutual labels:  storage
h5webstorage
Web Storage for Angular 2
Stars: ✭ 38 (+65.22%)
Mutual labels:  storage
KVStorage
Android η»“ζž„εŒ–KVε­˜ε‚¨ζ‘†ζžΆοΌŒεŸΊδΊŽ yaml η”Ÿζˆ java η»“ζž„εŒ–ε­˜ε‚¨η±»
Stars: ✭ 228 (+891.3%)
Mutual labels:  storage
oras
ORAS CLI
Stars: ✭ 672 (+2821.74%)
Mutual labels:  storage
cockpit-gluster
Easy to use management console for Gluster Storage with glusterd2 support.
Stars: ✭ 29 (+26.09%)
Mutual labels:  storage
sasutils
Serial Attached SCSI (SAS) Linux utilities and Python library
Stars: ✭ 36 (+56.52%)
Mutual labels:  storage
hangar
This is a plugin for the Kerbal Space Program. It provides several modules and parts to store complete vessels that aren't needed to free CPU of their burden.
Stars: ✭ 16 (-30.43%)
Mutual labels:  storage
haro
Haro is a modern immutable DataStore
Stars: ✭ 24 (+4.35%)
Mutual labels:  storage
react-native-s3
React Native app to upload and display images from Amazon S3 using AWS Amplify as the back end service.
Stars: ✭ 41 (+78.26%)
Mutual labels:  storage
MeowDB.js
Database in JSON (Node.JS Library)
Stars: ✭ 12 (-47.83%)
Mutual labels:  storage
graphite-remote-adapter
Fully featured graphite remote adapter for Prometheus
Stars: ✭ 33 (+43.48%)
Mutual labels:  storage

πŸ’Ύ react-native-modest-cache

Simple cache wrapper for AsyncStorage

Table of Contents

Table of Contents
  • About
  • Install
  • Usage
  • Contribute
  • License
  • About

    This module is a wrapper around react-native-modest-storage that extends it for handling cached values.

    Install

    $ npm install --save react-native-modest-cache
    # OR
    $ yarn add react-native-modest-cache

    Usage

    import cache from 'react-native-modest-cache'
    
    cache.set('foo', 5, -5) // (key, value, expiryDateInMinutes)
    cache.set('bar', 90) // Default to 60 min
    cache.set('baz', {hello: 'Friend'})
    cache.isExpired('foo').then(console.log) // true
    cache.isExpired('bar').then(console.log) // false
    cache.get('foo').then(console.log) // undefined
    cache.get('bar').then(console.log) // 90
    cache.get('baz').then(console.log) // Object {hello: "Friend"}
    
    cache.remove('bar')
    cache.get('bar').then(console.log) // undefined
    
    cache.set('bar', 50, {
    	interval: 'year', // 'year', 'quarter', 'month', 'week', 'day', 'minute' or 'second'
    	units: 2
    })
    cache.isExpired('bar').then(console.log) // false
    cache.get('bar').then(console.log) // 50
    
    cache.flushExpired()
    cache.flush().then(() => {
    	cache.get('bar').then(console.log) // undefined
    })

    Contribute

    Contributions are welcome. Please open up an issue or create PR if you would like to help out.

    License

    Licensed under the MIT License.

    Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].