@zenweb/cache
Version:
Zenweb Cache module
29 lines (28 loc) • 702 B
TypeScript
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 { 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;
}
}