mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-08 15:47:37 +08:00
chore: ugly console log to check if the cache is working for sure
This commit is contained in:
parent
4bfe6c9bf7
commit
33977b71e6
1 changed files with 3 additions and 0 deletions
|
@ -77,8 +77,10 @@ export async function getCount(
|
|||
): Promise<number> {
|
||||
const key = `${language}_${mode}_${mode2}`;
|
||||
if (cachedCounts.has(key)) {
|
||||
console.log("lb", key, "returning cached count");
|
||||
return cachedCounts.get(key) as number;
|
||||
} else {
|
||||
console.log("lb", key, "getting fresh count");
|
||||
const count = await getCollection({
|
||||
language,
|
||||
mode,
|
||||
|
@ -221,6 +223,7 @@ export async function update(
|
|||
await db.collection(lbCollectionName).createIndex({ rank: 1 });
|
||||
const end2 = performance.now();
|
||||
|
||||
console.log("lb", `${language}_${mode}_${mode2}`, "deleting count cache");
|
||||
cachedCounts.delete(`${language}_${mode}_${mode2}`);
|
||||
|
||||
//update speedStats
|
||||
|
|
Loading…
Add table
Reference in a new issue