Socket
Book a DemoInstallSign in
Socket

@fastcampus/fastcache

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastcampus/fastcache

fast and simple cache using redis

Source
npmnpm
Version
0.0.2
Version published
Maintainers
4
Created
Source

fastredis

fast and simple cache using redis

Getting Started

const FastCache = require('@fastcampus/fastcache');

const cache = FastCache.create({ redis: { host: 'localhost', port: 6379, db: 0 } });

await cache.set('foo', 'hello');
await cache.get('foo');
// hello

const list = cache.list('bar');
await list.unshift('one');
await list.push('two');
await list.getAll();
// [ one, two ]
await list.shift();
// one
await list.pop();
// two

const map = cache.map('baz');
await map.set('one', 'first');
await map.set('two', 'second');
await map.get('one');
// first
await map.getAll(['one', 'two']);
// [ first, second ]

Contributing

lint

$ npm run lint

test

$ npm run test

may the SOURCE be with you...

FAQs

Package last updated on 13 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts