@ts-fetcher/redis
v1.1.2
Published
Redis cache package for ts-fetch
Readme
@ts-fetcher/redis
- Installation
npm install ioredis @ts-fetcher/redis
# or
yarn add ioredis @ts-fetcher/redis
# or
bun add ioredis @ts-fetcher/redis
# or
pnpm add ioredis @ts-fetcher/redis- Usage
import { RedisCache, LocalCache } from '@ts-fetcher/cache';
const local = new LocalCache();
const redis = new RedisCache({
host: 'localhost',
password: 'redis',
port: 6379,
});
await redis.get<string>('key');
await redis.set<string>('key', 'value', 500);
await redis.del('key');