Skip to content

Conversation

@jinhokim98
Copy link
Contributor

@jinhokim98 jinhokim98 commented Nov 27, 2025

issue

구현 사항

프론트엔드 서버 캐시 삭제 기능

api route에 프론트엔드 서버 캐시를 삭제할 수 있는 endpoint를 추가했습니다.
이 api를 호출하면 서버의 캐시를 무효화할 수 있습니다.

추후에 로그인 한 사람만 실행할 수 있도록 방어코드를 작성해도 좋을 것 같아요.

그 외 구현 사항은 단순합니다.
다만 실제로 캐시가 무효화되는지는 정확하게 검증해보진 못했어요. 추후에 캐시 안 맞는 문제가 있을 때 눌러보면서 확인해봐요!

구현 영상

2025-11-28.00-47-03.mp4

@jinhokim98 jinhokim98 added this to the v3.1.2 milestone Nov 27, 2025
@jinhokim98 jinhokim98 moved this to In Review in crew-wiki-7-FE Nov 27, 2025
@jinhokim98 jinhokim98 self-assigned this Nov 27, 2025
Copy link
Contributor

@chosim-dvlpr chosim-dvlpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

궁금한 점 하나 남겨두었습니다! 타이밍 맞춰 버튼 눌러보고 싶네용ㅋㅋㅋ

};

// revalidate 1s
export const TAG_PREFIX = 'wiki/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 prefix는 새로 추가된 걸까요?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞아요. 이것도 가설이긴합니다...!
revalidateTag를 할 때 태그에 해당하는 캐시를 지운다고 합니다. 그래서 앞에 동일한 prefix를 달아두면 전부 무효화가 될 것 같아서 해봤습니닷

Copy link
Member

@ShinjungOh ShinjungOh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

캐시 무효화 좋네요~~ 은근 자주 사용될 것 같아요ㅋㅋ 고생하셨습니다!!

className="flex w-full items-center gap-3 rounded-lg px-4 py-3 font-pretendard text-sm text-grayscale-700 transition-colors hover:bg-grayscale-100"
onClick={onClickDeleteCacheButton}
>
캐시 삭제
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

캐시 삭제 버튼의 위치를 로그아웃 위로 올리는 것은 어떨까요?
로그아웃은 최하단에 있는 것이 더 익숙하게 느껴지네요~!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 좋습니다~~ 올려둘게요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinhokim98 jinhokim98 merged commit 4343be8 into develop Jan 6, 2026
@jinhokim98 jinhokim98 deleted the feature/#165 branch January 6, 2026 09:53
@github-project-automation github-project-automation bot moved this from In Review to Done in crew-wiki-7-FE Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants