-
Notifications
You must be signed in to change notification settings - Fork 2
fix: handwriting API 캐시 전략 개선 #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -11,6 +11,8 @@ export const useGetHandwriting = (scrapId: number, enabled = true) => { | |||
| }, | ||||
| { | ||||
| enabled, | ||||
| staleTime: Infinity, | ||||
|
||||
| staleTime: Infinity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setQueryData에{ data: request.data }를 넣으면 GET/handwriting캐시 타입(스크랩 ID/updatedAt 포함ScrapHandwritingResp)과 shape가 달라지고, 서버가 응답에서 보정한 값/updatedAt도 반영되지 않습니다.onSuccess의 첫 번째 인자인 mutation response를 사용해 캐시를 동일한 응답 객체로 설정하거나, 기존 캐시와 merge해서scrapId/updatedAt필드를 유지하도록 수정해 주세요.