MCPcopy Index your code
hub / github.com/code100x/cms / set

Method set

src/lib/cache/redis-cache.ts:21–33  ·  view source on GitHub ↗
(
    type: string,
    args: string[],
    value: any,
    expirySeconds: number,
  )

Source from the content-addressed store, hash-verified

19 }
20
21 async set(
22 type: string,
23 args: string[],
24 value: any,
25 expirySeconds: number,
26 ): Promise<void> {
27 const key = this.generateKey(type, args);
28 if (expirySeconds) {
29 await this.client.set(key, JSON.stringify(value), 'EX', expirySeconds);
30 } else {
31 await this.client.set(key, JSON.stringify(value));
32 }
33 }
34
35 async get(type: string, args: string[]): Promise<any> {
36 const key = this.generateKey(type, args);

Callers

nothing calls this directly

Calls 2

generateKeyMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected