Skip to content
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

Server Component에서 불러오는 데이터 캐싱 #64

Open
ruddnjs3769 opened this issue Jan 17, 2025 · 0 comments
Open

Server Component에서 불러오는 데이터 캐싱 #64

ruddnjs3769 opened this issue Jan 17, 2025 · 0 comments

Comments

@ruddnjs3769
Copy link
Contributor

서버컴포넌트에서 불러온 데이터는 캐싱되는데,
기본값이 cache: force-cache라서, 다시 빌드하기 전까지는 캐싱된 값만 사용하는것같습니다.
revalidate옵션으로 한시간마다 캐싱해줘서 변화된게 반영될수있게 해놓겠습니다!

일단 product는 revalidate 옵션을 적용했는데, 다른 옵션들도 검토가 필요합니다.

검토가 필요한 기준

  • Server Component에서 사용되고 있는가?
  • 캐싱 옵션이 force-cache 또는 작성되지 않아 기본값인가?
  • 유저 개인의 데이터인가? 개인 데이터일 시 no-store적용 : 공용 데이터일 시 force-cache, revalidate: 시간(ms) 적용
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant