-
Notifications
You must be signed in to change notification settings - Fork 1
✨ [Feat]: 레크레이션 검색 결과 캐싱 #160
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
Open
yongmin01
wants to merge
36
commits into
dev
Choose a base branch
from
(#157)refactor/searchlist-caching
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
Contributor
|
음 좋아보이긴하네요... 혹시 아이디를 기준으로 캐싱 데이터를 구별하는 건 어렵나요? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📢 기능 설명
그런데.. 문득 이걸 캐싱하는게 맞을까라는 생각이 드네요..🤔

"현재 페이지, 정렬 기준, 쿼리 스트링"에 따라서 검색 결과가 매번 달라져서 검색할 때마다 캐시가 겁나 쌓이는데 이게 과연 좋을까..?
좋다면.. staleTime과 gcTime을 몇으로 설정하는게 좋을지?
함께 논의해봐여~
++ 메인페이지 데이터들을 캐싱하는건 확실히 성능에 도움될거 같아서 작업 예정입니당(작업 완료)
5/22 pr 참고 사항
레크레이션 검색 데이터 캐싱되게 해놨는데 문제가 있음.. 즐겨찾기하면 동기화를 위해 즉시 쿼리를 무효화시키고 즐찾이 반영된 데이터가 새로 받아와지기 때문에 인기순 정렬되어 있을 때 즐찾을 누르자마자 검색 결과에서 위치가 바뀝니다. ux적으로 안 좋은 것 같은데 아직 해결책을 찾지 못했어요..
🐛 초기 검색 이후 추가로 조건을 설정한 뒤 "필터 적용" 클릭하지 않고 페이네이션 이동이나 정렬을 바꿨을 때 적용하지 않은 조건이 남아있는 버그가 있었습니다. page, sortBy 바뀔 때마다 현재 state랑 쿼리스트링 비교해서 다른 경우에 현재 state를 쿼리스트링에 맞춰서 동기화시켰습니다. 코드가 좀 복잡한거 같은데 더 좋은 방법 있으면 공유해주십시오 🙏
83c823e
검색 조건 수정해서 재검색 하면 페이지네이션 1로 초기화되게 수정했습니다. 그런데 저렇게하면 리렌더링이 너무 많이 일어나서 page도 쿼리스트링에 포함시키는 방향으로 수정할지 고민중입니다. 이것도 의견 부탁드려요. 그리고 상세페이지 갔다가 돌아올 때 페이지 유지시키게 하는 것도 그렇게 하면 구현 쉬울 것 같음..!
c90ded6
🔗 연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #157
🩷 Approve 하기 전 확인해주세요!
✅ 체크리스트