MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getCachedAvgEntry

Function getCachedAvgEntry

admin_board/admin_board.ts:437–446  ·  view source on GitHub ↗
(
  target: TargetChat,
  userId: string,
)

Source from the content-addressed store, hash-verified

435
436async function setCachedEntry(
437 target: TargetChat,
438 userId: string,
439 patch: Partial<AvgCacheEntry>,
440): Promise<void> {
441 const db = await getAvgCacheDb();
442 const key = getAvgCacheKey(target, userId);
443 const current = db.data.values[key] || { updatedAt: Date.now() };
444 db.data.values[key] = {
445 ...current,
446 ...patch,
447 updatedAt: Date.now(),
448 };
449 await db.write();

Callers 2

getCachedUserInfoFunction · 0.85
collectAdminStatFunction · 0.85

Calls 2

getAvgCacheDbFunction · 0.85
getAvgCacheKeyFunction · 0.85

Tested by

no test coverage detected