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

[로그인, 로그아웃] 글로벌 캐시Redis에서 로컬 캐시로 변경 #108

Merged
merged 8 commits into from
Dec 3, 2023

Conversation

byeolhaha
Copy link
Member

구현

  • 현재 저희 서비스에서 Redis를 사용하는 것은 오버 스팩으로 판단하여 로컬 캐시로 변경하였습니다.
  • 로컬 캐시 중에서 Ehcache와 Caffeine을 비고했을 때 제공하는 기능은 다소 적지만 읽기와 쓰기 성능이 좋은 Caffeine을 선택하게 되었습니다.

@byeolhaha byeolhaha self-assigned this Dec 3, 2023
@byeolhaha byeolhaha added the enhancement New feature or request label Dec 3, 2023
Copy link
Contributor

@onetuks onetuks left a comment

Choose a reason for hiding this comment

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

별님 고생하셨습니다!!

덕분에 카페인 캐시에 대해서도 알아가네요!!

Comment on lines +9 to +13
@Repository
public class LogoutTokenRepository {

private final JwtTokenCacheConfig jwtTokenCacheConfig;
private final Cache<String, String> logoutCache;
Copy link
Contributor

Choose a reason for hiding this comment

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

로그아웃 토근도 따로 있나보네요??
JWT 랑 같은 형식인가요?

Copy link
Member Author

Choose a reason for hiding this comment

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

오 맞습니다.
로그아웃 했지만 만료되지 않은 AccessToken으로 요청을 보낼 위험이 있어서
아직 만료기간이 남은 로그아웃 한 AccessToken을 보관하고 있습니다.
JWT와 같은 형식입니다.

Comment on lines -71 to +72
refreshTokenRepository.save(new JwtToken(refreshToken.getToken(), newAccessToken.getToken()));
refreshTokenRepository.save(newAccessToken.getToken(), refreshToken.getToken());
Copy link
Contributor

Choose a reason for hiding this comment

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

이건 리프레시로 새로 발급하는 거고 , 아래는 아예 모든 토큰을 새로 만드는 거군요!!

Comment on lines 115 to 117
// Netty/Resolver/DNS/Native/MacOS
implementation("io.netty:netty-resolver-dns-native-macos:4.1.79.Final:osx-aarch_64")

Copy link
Contributor

Choose a reason for hiding this comment

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

오 감사합니다!!

Copy link
Member Author

Choose a reason for hiding this comment

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

이건 develop에서 충돌 해결하면서 추가되었습니다 🌸

@byeolhaha byeolhaha merged commit 66d2e7b into develop Dec 3, 2023
1 check passed
@onetuks onetuks deleted the auth branch December 8, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants