()
| 422 | return `${target.storageKey}:${userId}`; |
| 423 | } |
| 424 | |
| 425 | async function getCachedAvgEntry( |
| 426 | target: TargetChat, |
| 427 | userId: string, |
| 428 | ): Promise<AvgCacheEntry | undefined> { |
| 429 | const db = await getAvgCacheDb(); |
| 430 | const entry = db.data.values[getAvgCacheKey(target, userId)]; |
| 431 | if (!entry) return undefined; |
| 432 | if (Date.now() - entry.updatedAt > DAY_MS) return undefined; |
| 433 | return entry; |
| 434 | } |
no outgoing calls
no test coverage detected