-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: 엑셀 다운로드 따닥 방지 #1133
refactor: 엑셀 다운로드 따닥 방지 #1133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 오타 하나만 확인해주세요
@RedisHash(value = "excelDownload") | ||
public class ExcelDownloadCache { | ||
|
||
private static final long CACHE_EXPIRE_MINUTES = 30L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
R
MINUTES ->SECONDS 로 수정해야 될거 같아요.
# Conflicts: # src/main/java/in/koreatech/koin/domain/coop/service/CoopService.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨어요!
public class DuplicateExcelRequestException extends DuplicationException { | ||
private static final String DEFAULT_MESSAGE = "동일한 요청을 30초 안에 다시 보낼 수 없습니다!"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개행 한 줄 필요할 것 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 제안드린 방향으로 구현해주셨네요!! 감사합니다 😄
if (isCacheExist) { | ||
throw DuplicateExcelRequestException.withDetail(startDate, endDate); | ||
} | ||
excelDownloadCacheRepository.save(ExcelDownloadCache.from(startDate.toString() + endDate.toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C
startDate, endDate만 파라미터로 전달하고, 둘을 toString하여 합치는 로직은 from 안에 넣는 건 어떨까요!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그게 더 깔끔하고 좋을 것 같네요 👍
🔥 연관 이슈
🚀 작업 내용
💬 리뷰 중점사항