summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/UserMutingService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-06-05 13:16:23 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-09 11:02:36 -0400
commit46a6612dc0e5eaa470170031012ae247f7a5eec5 (patch)
tree126f4592c920e1ce7e13e79839e78498553e8b43 /packages/backend/src/core/UserMutingService.ts
parentadd ignoreRemote filter to InternalEventService (diff)
downloadsharkey-46a6612dc0e5eaa470170031012ae247f7a5eec5.tar.gz
sharkey-46a6612dc0e5eaa470170031012ae247f7a5eec5.tar.bz2
sharkey-46a6612dc0e5eaa470170031012ae247f7a5eec5.zip
convert many RedisKVCaches to QuantumKVCache or MemoryKVCache
Diffstat (limited to 'packages/backend/src/core/UserMutingService.ts')
-rw-r--r--packages/backend/src/core/UserMutingService.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/backend/src/core/UserMutingService.ts b/packages/backend/src/core/UserMutingService.ts
index 06643be5fb..4f72c1863b 100644
--- a/packages/backend/src/core/UserMutingService.ts
+++ b/packages/backend/src/core/UserMutingService.ts
@@ -32,7 +32,7 @@ export class UserMutingService {
muteeId: target.id,
});
- this.cacheService.userMutingsCache.refresh(user.id);
+ await this.cacheService.userMutingsCache.delete(user.id);
}
@bindThis
@@ -43,9 +43,8 @@ export class UserMutingService {
id: In(mutings.map(m => m.id)),
});
- const muterIds = [...new Set(mutings.map(m => m.muterId))];
- for (const muterId of muterIds) {
- this.cacheService.userMutingsCache.refresh(muterId);
- }
+ await Promise.all(Array
+ .from(new Set(mutings.map(m => m.muterId)))
+ .map(muterId => this.cacheService.userMutingsCache.delete(muterId)));
}
}