Optimize the message notifications

This commit is contained in:
2025-05-30 01:52:09 +08:00
parent fac9c3ae88
commit 8beeac09ef
3 changed files with 53 additions and 16 deletions

View File

@ -25,8 +25,8 @@ public class ChatRoomService(AppDatabase db, ICacheService cache)
.ToListAsync();
var chatRoomGroup = ChatRoomGroupPrefix + roomId;
await cache.SetWithGroupsAsync(cacheKey, members,
new[] { chatRoomGroup },
await cache.SetWithGroupsAsync(cacheKey, members,
[chatRoomGroup],
TimeSpan.FromMinutes(5));
return members;