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

Method persistDb

fbi/fbi.ts:141–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139 for (const [k, v] of Object.entries(this.configDb.data.surveillance)) this.sv.set(k, v as SvEntry);
140 // load cache from separate file — tolerate corrupt/truncated JSON
141 const cp = path.join(createDirectoryInAssets("fbi"), "cache.json");
142 this.cachePath = cp;
143 try {
144 this.cacheDb = await JSONFilePreset<FbiCache>(cp, { cache: {} });
145 if (this.cacheDb.data.cache) {
146 for (const [k, v] of Object.entries(this.cacheDb.data.cache))
147 this.chatCache.set(k, v as CachedChat);

Callers 3

doSvMethod · 0.95
onMsgMethod · 0.95
doSsvMethod · 0.95

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected