LevelDB cache service for Koishi
npm install koishi-plugin-cache-leveldb完整介绍请参考 github.com/koishijs/cache
``ts
import {} from '@koishijs/cache'
// 扩展 foo 表
declare module '@koishijs/cache' {
interface Tables {
foo: number
}
}
// 声明依赖
export const inject = {
required: ['cache'],
optional: []
};
await ctx.cache.set('foo', 'bar', 114514)
await ctx.cache.get('foo', 'bar') // 会返回 114514
``