Coder Social home page Coder Social logo

candlefinance / cache Goto Github PK

View Code? Open in Web Editor NEW
58.0 1.0 0.0 1.54 MB

A key/value store for React Native

Home Page: https://candle.fi

License: MIT License

JavaScript 15.49% Ruby 20.41% Java 18.75% C 0.53% Objective-C 12.10% Objective-C++ 7.23% Swift 6.45% TypeScript 19.04%
android ios key-value react-native room-database sqlite grdb cache cache-storage offline-mode

cache's Introduction



Cache store for React Native

Screenshot 2024-05-01 at 12 27 12 AM

Using DiskCache for Android and non-deadlocking parallel PINCache for iOS, this library provides a simple interface to store data in a key-value format for offline mode.

Installation

  • Requires iOS 15+ for iOS
yarn add @candlefinance/cache
npm i @candlefinance/cache
  1. Add to your target in your Podfile if you get an error
pod 'PINCache', :modular_headers => true

Usage

Currently max size on iOS is 50MB and 100MB on Android.

await write('key', 'value');

const result = await read('key'); // can be undefined if key doesn't exist

await remove('key');

await clear();

Contributing

Join our Discord and ask questions in the #oss channel.

License

MIT

cache's People

Contributors

candle-admin avatar gtokman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cache's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.