From 1cc040a5d46d50845442628e597d87c9bb86efdb Mon Sep 17 00:00:00 2001 From: koreacomp5 Date: Thu, 9 Oct 2025 15:16:44 +0900 Subject: [PATCH] =?UTF-8?q?4.3=20=EC=BA=90=EC=8B=9C=20=ED=82=A4/=EB=AC=B4?= =?UTF-8?q?=ED=9A=A8=ED=99=94=20=EC=A0=84=EB=9E=B5=20=EC=88=98=EB=A6=BD=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=81=EC=9A=A9=20o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/queryKeys.ts | 18 ++++++++++++++++++ todolist.txt | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/lib/queryKeys.ts diff --git a/src/lib/queryKeys.ts b/src/lib/queryKeys.ts new file mode 100644 index 0000000..cc25c56 --- /dev/null +++ b/src/lib/queryKeys.ts @@ -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, + }, +}; + + diff --git a/todolist.txt b/todolist.txt index 570a9c3..fdd3b61 100644 --- a/todolist.txt +++ b/todolist.txt @@ -23,7 +23,7 @@ [상태관리/데이터] 4.1 React Query 설치 및 Provider 구성 o 4.2 공통 fetcher/에러 형식/재시도·백오프 설정 o -4.3 캐시 키/무효화 전략 수립 및 적용 +4.3 캐시 키/무효화 전략 수립 및 적용 o 4.4 낙관적 업데이트 패턴 적용(작성/수정) [공통/레이아웃]