MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / constructor

Method constructor

panel/src/app/service/mini_redis.ts:9–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 private readonly envMap: Map<string, Data> = new Map();
8
9 constructor() {
10 setInterval(() => {
11 const now = Date.now();
12 for (const [key, data] of this.envMap) {
13 if (now >= data.ttl) {
14 this.envMap.delete(key);
15 }
16 }
17 }, 500);
18 }
19
20 get<T = any>(key: string): T | undefined {
21 const data = this.envMap.get(key);

Callers

nothing calls this directly

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected