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

[FE] staleTime, gcTime 기본 값 설정 #593

Open
1 task done
jinhokim98 opened this issue Sep 24, 2024 · 0 comments · May be fixed by #607
Open
1 task done

[FE] staleTime, gcTime 기본 값 설정 #593

jinhokim98 opened this issue Sep 24, 2024 · 0 comments · May be fixed by #607
Assignees
Labels
Milestone

Comments

@jinhokim98
Copy link
Contributor

jinhokim98 commented Sep 24, 2024

📄 설명

현재 react-query의 staleTime과 gcTime 설정이 안 되어있습니다.
그래서 데이터를 불러오자마자 stale 처리되어 매 번 데이터를 다시 불러오게 되는 문제가 있습니다.

  • stale time

    • 캐싱된 데이터가 stale이 되는데 걸리는 시간
    • 캐싱된 데이터가 유효한 시간이라고 생각하면 된다.
  • gc time

    • 캐싱된 데이터가 inactive가 된 후 garbage collector가 쓸어가는 시간

적절한 staleTime, gcTime 값을 설정해서 특정 시간 내에서 다시 요청했을 땐 실제 api를 호출하지 않고 캐싱된 데이터를 사용할 수 있도록 설정할 것입니다.

🏁 할 일

  • stale time, gc time 기본 값 설정

🫡 참고사항

@jinhokim98 jinhokim98 added the ⚙️ feat feature label Sep 24, 2024
@jinhokim98 jinhokim98 self-assigned this Sep 24, 2024
@jinhokim98 jinhokim98 added the 🖥️ FE Frontend label Sep 24, 2024
@jinhokim98 jinhokim98 added this to the lev4 milestone Sep 24, 2024
@jinhokim98 jinhokim98 linked a pull request Sep 24, 2024 that will close this issue
@jinhokim98 jinhokim98 linked a pull request Sep 24, 2024 that will close this issue
@Todari Todari modified the milestones: lev4, v2.0.0 Sep 25, 2024
@jinhokim98 jinhokim98 modified the milestones: v2.0.0, v2.0.1 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🤼 In Review
2 participants