체험 상세 페이지 캐싱 전략 #441
Seon-K
started this conversation in
Engineering Breakdown
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1. 설계 배경 및 목적
2. 구성요소 및 구조
/domain/Activity/services/detail,/hooksgetActivityDetail: SSR 기반 서버 컴포넌트에서 호출, ISR 사용useActivityReviews: 클라이언트 컴포넌트에서 React Query 기반 CSR 처리 (초기 데이터 패칭은 서버 컴포넌트에서 진행)useAvailableSchedule: 클라이언트 컴포넌트에서 React Query 기반 CSR 처리3. 동작 흐름 요약
4. 설계 의도 및 고려사항
5. 캐싱 무효화 방법
체험 상세 페이지에서 사용하는 다음 세 가지 데이터에 대해 각각의 캐싱 무효화 방법입니다.
1. 체험 상세 데이터 (getActivityDetail)
revalidateTag사용next: { tags: [...] }포함되어 있어야 함무효화 코드
2. 체험 리뷰 목록 (useActivityReviews)
invalidateQueries무효화 코드
3. 예약 가능 날짜 (useAvailableSchedule)
invalidateQueries무효화 코드
전체 예시
체험을 수정한 뒤, 관련 데이터를 모두 무효화하는 예시입니다.
Beta Was this translation helpful? Give feedback.
All reactions