perf: 优化证书流水线创建,支持选择分组

This commit is contained in:
xiaojunnuo
2025-04-19 16:05:24 +08:00
parent 5750bb7067
commit d613aa8f3e
11 changed files with 400 additions and 298 deletions
@@ -7,6 +7,7 @@ import { routerUtils } from "./util.router";
import { treeUtils } from "./util.tree";
import { hashUtils } from "./util.hash";
import { amountUtils } from "./util.amount";
import { cache } from "./util.cache";
export const util = {
...envs,
...sites,
@@ -17,5 +18,6 @@ export const util = {
tree: treeUtils,
hash: hashUtils,
amount: amountUtils,
cache,
};
export const utils = util;
@@ -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();