redis pt 2: read cache wiring & event based invalidations

This commit is contained in:
2026-03-30 18:18:46 +08:00
parent c2bafc5bb1
commit d12d3e1ec7
14 changed files with 475 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ import { Doll } from '@prisma/client';
export const UserEvents = {
ACTIVE_DOLL_CHANGED: 'user.active-doll.changed',
SEARCH_INDEX_INVALIDATED: 'user.search-index.invalidated',
} as const;
export interface UserActiveDollChangedEvent {
@@ -9,3 +10,7 @@ export interface UserActiveDollChangedEvent {
dollId: string | null;
doll: Doll | null;
}
export interface UserSearchIndexInvalidatedEvent {
userId?: string;
}