4.3 캐시 키/무효화 전략 수립 및 적용 o

This commit is contained in:
koreacomp5
2025-10-09 15:16:44 +09:00
parent 2b85741955
commit 1cc040a5d4
2 changed files with 19 additions and 1 deletions

18
src/lib/queryKeys.ts Normal file
View File

@@ -0,0 +1,18 @@
export const queryKeys = {
boards: {
all: ["boards"] as const,
},
posts: {
list: (params: { page: number; pageSize: number; boardId?: string; q?: string }) =>
["posts", "list", params] as const,
detail: (id: string) => ["posts", "detail", id] as const,
},
comments: {
list: (postId: string) => ["comments", "list", postId] as const,
},
auth: {
permissions: ["auth", "permissions"] as const,
},
};