MCPcopy Create free account
hub / github.com/code100x/cms / get

Method get

src/lib/cache/in-memory-cache.ts:36–47  ·  view source on GitHub ↗
(type: string, args: string[])

Source from the content-addressed store, hash-verified

34 }
35
36 async get(type: string, args: string[]): Promise<any> {
37 const key = this.generateKey(type, args);
38 const entry = this.inMemoryDb.get(key);
39 if (!entry) {
40 return null;
41 }
42 if (new Date().getTime() > entry.expiry) {
43 this.inMemoryDb.delete(key);
44 return null;
45 }
46 return entry.value;
47 }
48
49 async evict(type: string, args: string[]): Promise<null> {
50 const key = this.generateKey(type, args);

Callers

nothing calls this directly

Calls 2

generateKeyMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected