UNPKG

@zenweb/cache

Version:
31 lines (30 loc) 800 B
import { SetupFunction } from '@zenweb/core'; import { SetupOption } from './types.js'; import { Cache } from './cache.js'; import { Redis } from 'ioredis'; export * from './global.js'; export * from './types.js'; export * from './utils.js'; export { GzCompressor } from './compressor.js'; export { JSONSerializer } from './serializer.js'; export { Locker } from './locker.js'; export { cached } from './middleware.js'; export { CacheHelper } from './helper.js'; export { Cache }; /** * 安装模块 * @param option 配置 */ export default function setup(option?: SetupOption): SetupFunction; declare module '@zenweb/core' { interface Core { /** * Redis 实例 */ redis2: Redis; /** * 缓存实例 */ cache2: Cache; } }