4.3 캐시 키/무효화 전략 수립 및 적용 o
This commit is contained in:
18
src/lib/queryKeys.ts
Normal file
18
src/lib/queryKeys.ts
Normal 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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user