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

Function getCachedUserInfo

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

Source from the content-addressed store, hash-verified

482 };
483}
484
485async function clearAvgCache(target?: TargetChat): Promise<number> {
486 const db = await getAvgCacheDb();
487
488 if (!target) {
489 const count = Object.keys(db.data.values).length;
490 db.data.values = {};
491 await db.write();
492 return count;
493 }
494
495 const prefix = `${target.storageKey}:`;
496 const keys = Object.keys(db.data.values).filter((key) =>
497 key.startsWith(prefix),
498 );

Callers 1

handleSeatActionFunction · 0.85

Calls 1

getCachedAvgEntryFunction · 0.85

Tested by

no test coverage detected