项目作者: Pod-Point

项目描述 :
A cache service for JS applications.
高级语言: TypeScript
项目地址: git://github.com/Pod-Point/cache-js.git
创建时间: 2019-12-30T10:55:21Z
项目社区:https://github.com/Pod-Point/cache-js

开源协议:MIT License

下载


Cache JS

Build Status

A cache service for JS.

Usage

To install this package, run the following command:

  1. npm install @pod-point/cache-js

Once installed, simply create a new instance of the Cache service and begin using it e.g.

  1. import { Redis } from '@pod-point/cache-js';
  2. const cacheService = new Redis();
  3. 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:

  1. npm install

Testing

This package uses jest. To run the test suites for this project, run the following command:

  1. 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