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

Method get

panel/src/app/service/mini_redis.ts:20–28  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

18 }
19
20 get<T = any>(key: string): T | undefined {
21 const data = this.envMap.get(key);
22 if (!data) return undefined;
23 if (Date.now() >= data.ttl) {
24 this.envMap.delete(key);
25 return undefined;
26 }
27 return data.value as T;
28 }
29
30 set<T = any>(key: string, value: T, ttl: number = 0) {
31 this.envMap.set(key, {

Callers 15

getVersionFunction · 0.45
hasVersionChangedFunction · 0.45
execWithMutexFunction · 0.45
execWithMutexIdFunction · 0.45
permission.tsFile · 0.45
speedLimitFunction · 0.45
loginFunction · 0.45
checkBanIpFunction · 0.45
emitCountEventMethod · 0.45
eventCountMethod · 0.45
getCallbackUrlFunction · 0.45
ttlMethod · 0.45

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected