mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
perf: 优化证书流水线创建,支持选择分组
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export class Cache {
|
||||
bucket: Record<string, any> = {};
|
||||
|
||||
async get(key: string) {
|
||||
return this.bucket[key];
|
||||
}
|
||||
|
||||
async set(key: string, value: any, ttl: number) {
|
||||
this.bucket[key] = value;
|
||||
}
|
||||
|
||||
async del(key: string) {
|
||||
delete this.bucket[key];
|
||||
}
|
||||
}
|
||||
|
||||
export const cache = new Cache();
|
||||
Reference in New Issue
Block a user