@pod-point/cache-js
v1.0.4
Published
A cache service for JS.
Downloads
24
Maintainers
Readme
Cache JS
A cache service for JS.
Usage
To install this package, run the following command:
npm install @pod-point/cache-js
Once installed, simply create a new instance of the Cache service and begin using it e.g.
import { Redis } from '@pod-point/cache-js';
const cacheService = new Redis();
await cacheService.put('foo', 'bar');
There are only 3 simple methods a cache service can carry out, and these are put
, get
and remove
, all fairly self-explanatory!
When putting key/value pairs into the cache you can also set an expiry date, or a time in seconds until it should expire.
Development
Installation
To install this packages dependencies, run the following command:
npm install
Testing
This package uses jest. To run the test suites for this project, run the following command:
npm run test
License
The MIT License (MIT). Please see License File for more information.
Travel shouldn't damage the earth 🌍
Made with ❤️ at Pod Point