MCPcopy
hub / github.com/fosrl/pangolin / set

Method set

server/lib/cache.ts:32–41  ·  view source on GitHub ↗

* Set a value in the cache * @param key - Cache key * @param value - Value to cache (will be JSON stringified for Redis) * @param ttl - Time to live in seconds (0 = no expiration) * @returns boolean indicating success

(key: string, value: any, ttl?: number)

Source from the content-addressed store, hash-verified

30 * @returns boolean indicating success
31 */
32 async set(key: string, value: any, ttl?: number): Promise<boolean> {
33 const effectiveTtl = ttl === 0 ? undefined : ttl;
34
35 // Use local cache as fallback or primary
36 const success = localCache.set(key, value, effectiveTtl || 0);
37 if (success) {
38 logger.debug(`Set key in local cache: ${key}`);
39 }
40 return success;
41 }
42
43 /**
44 * Get a value from the cache

Callers 15

disableUser2fa.tsFile · 0.45
setServerAdmin.tsFile · 0.45
makeApiRequestFunction · 0.45
buildQueryStringFunction · 0.45
handleFilterChangeFunction · 0.45
handlePaginationChangeFunction · 0.45
UsersTableFunction · 0.45
handlePaginationChangeFunction · 0.45
OrgLabelsTableFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected