redis pt 4: presence & more cache invalidation

This commit is contained in:
2026-03-30 23:48:18 +08:00
parent ad09de2b11
commit 4151984b5c
16 changed files with 328 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ import { Doll } from '@prisma/client';
export const UserEvents = {
ACTIVE_DOLL_CHANGED: 'user.active-doll.changed',
SEARCH_INDEX_INVALIDATED: 'user.search-index.invalidated',
PROFILE_UPDATED: 'user.profile.updated',
} as const;
export interface UserActiveDollChangedEvent {
@@ -14,3 +15,7 @@ export interface UserActiveDollChangedEvent {
export interface UserSearchIndexInvalidatedEvent {
userId?: string;
}
export interface UserProfileUpdatedEvent {
userId: string;
}