Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amaui-org/amaui-cache

Cache
https://github.com/amaui-org/amaui-cache

amaui back-end backend browser cache caches caching front-end frontend javascript js library node nodejs typescript web

Last synced: about 2 months ago
JSON representation

Cache

Awesome Lists containing this project

README

        



amaui logo

amaui Cache


Cache



MIT license    
Production ready    
UMD 4.2kb gzipped    
100% test cov    
Browser and Nodejs


Very simple code    
Modern code    
Junior friendly    
Typescript    
Made with :yellow_heart:


## Getting started

### Add

```sh
yarn add @amaui/cache
```

### Use

```javascript
import AmauiCache from '@amaui/cache';

const args = [4, { a: 4, ab: 4 }];

// Args is made into a hash, which makes the key
// a very useful, when you wanna cache a value based
// on some complex amount of variables
AmauiCache.add(4, ...args);

AmauiCache.get(...args);

// Output
// 4
```

### Dev

Install

```sh
yarn
```

Test

```sh
yarn test
```

### Prod

Build

```sh
yarn build
```