summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/UserBlockingService.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/UserBlockingService.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/UserBlockingService.ts')
-rw-r--r--packages/backend/src/core/UserBlockingService.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/backend/src/core/UserBlockingService.ts b/packages/backend/src/core/UserBlockingService.ts
index 8da1bb2092..1a1e7c4778 100644
--- a/packages/backend/src/core/UserBlockingService.ts
+++ b/packages/backend/src/core/UserBlockingService.ts
@@ -77,8 +77,10 @@ export class UserBlockingService implements OnModuleInit {
await this.blockingsRepository.insert(blocking);
- this.cacheService.userBlockingCache.refresh(blocker.id);
- this.cacheService.userBlockedCache.refresh(blockee.id);
+ await Promise.all([
+ this.cacheService.userBlockingCache.delete(blocker.id),
+ this.cacheService.userBlockedCache.delete(blockee.id),
+ ]);
this.globalEventService.publishInternalEvent('blockingCreated', {
blockerId: blocker.id,
@@ -168,8 +170,10 @@ export class UserBlockingService implements OnModuleInit {
await this.blockingsRepository.delete(blocking.id);
- this.cacheService.userBlockingCache.refresh(blocker.id);
- this.cacheService.userBlockedCache.refresh(blockee.id);
+ await Promise.all([
+ this.cacheService.userBlockingCache.delete(blocker.id),
+ this.cacheService.userBlockedCache.delete(blockee.id),
+ ]);
this.globalEventService.publishInternalEvent('blockingDeleted', {
blockerId: blocker.id,