0.0.5 • Published 2 years ago
@potoland/cache v0.0.5
@potoland/cache
Most importantly, potoland's cache is:
A resource control cache layer, based on carriers and resource-intensive policies
Install (for node18)
npm install @potoland/cache
Example (Basic)
import { Cache, RedisAdapter } from '@potoland/cache';
import Redis from 'ioredis';
const bootstrap = async () => {
const cache = new Cache(new RedisAdapter({ client: new Redis() }));
// You can listen to the raw potocuit event
await cache.onPacket(<Shard>, <payloads>);
};
bootstrap();