Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onesy-me/cache
Cache
https://github.com/onesy-me/cache
amaui back-end backend browser cache caches caching front-end frontend javascript js library node nodejs typescript web
Last synced: 10 days ago
JSON representation
Cache
- Host: GitHub
- URL: https://github.com/onesy-me/cache
- Owner: onesy-me
- License: mit
- Created: 2022-02-03T16:04:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-11T20:30:17.000Z (23 days ago)
- Last Synced: 2024-12-11T20:36:24.947Z (23 days ago)
- Topics: amaui, back-end, backend, browser, cache, caches, caching, front-end, frontend, javascript, js, library, node, nodejs, typescript, web
- Language: JavaScript
- Homepage: https://docs.onesy.me/library/cache
- Size: 73.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
onesy 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 @onesy/cache
```### Use
```javascript
import OnesyCache from '@onesy/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
OnesyCache.add(4, ...args);OnesyCache.get(...args);
// Output
// 4
```### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```### Prod
Build
```sh
yarn build
```