Skip to content

feat: 주요 조회 API 레디스 캐싱 설정 추가#111

Merged
dev-ant merged 10 commits into
devfrom
feat/redie-cache
Mar 3, 2026
Merged

feat: 주요 조회 API 레디스 캐싱 설정 추가#111
dev-ant merged 10 commits into
devfrom
feat/redie-cache

Conversation

@dev-ant

@dev-ant dev-ant commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

📋 상세 설명

  • Spring Cache + Redis 설정 추가(프로퍼티/의존성/CacheManager+TTL 구성/캐시 이름 상수화)
  • 주요 조회 API에 @Cacheable 적용 및 배치/동기화/집계 완료 시 @CacheEvict로 캐시 무효화
  • AuctionHistory 배치 이후 캐시 무효화 + 기본 쿼리 조합 워밍업 로직 추가

📊 체크리스트

  • PR 제목이 형식에 맞나요 e.g. feat: PR을 등록한다
  • 코드가 테스트 되었나요
  • 문서는 업데이트 되었나요
  • 불필요한 코드를 제거했나요
  • 이슈와 라벨이 등록되었나요

@dev-ant dev-ant requested a review from Copilot February 28, 2026 01:44
@dev-ant dev-ant self-assigned this Feb 28, 2026
@dev-ant dev-ant added the ✨feature 새로운 기능 추가 label Feb 28, 2026
@github-actions

github-actions Bot commented Feb 28, 2026

Copy link
Copy Markdown

✅ 테스트 결과 for PR

Build: success

🧪 테스트 실행 with Gradle
📈 Coverage: -0.00%

📁 테스트 결과
📁 커버리지 보고서 (HTML)

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 28 out of 29 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +47
@Cacheable(
cacheNames = CacheNames.AUCTION_HISTORY_SEARCH,
key =
"#pageRequestDto.page() + ':'"
+ " + #pageRequestDto.size() + ':'"
+ " + (#pageRequestDto.sortBy() != null ? #pageRequestDto.sortBy().fieldName : 'dateAuctionBuy') + ':'"
+ " + (#pageRequestDto.direction() != null ? #pageRequestDto.direction().code : 'DESC') + ':'"
+ " + (#requestDto.itemName() ?: '') + ':'"
+ " + (#requestDto.isExactItemName() ?: false) + ':'"
+ " + (#requestDto.itemTopCategory() ?: '') + ':'"
+ " + (#requestDto.itemSubCategory() ?: '') + ':'"
+ " + (#requestDto.dateAuctionBuyRequest()?.dateAuctionBuyFrom() ?: '') + ':'"
+ " + (#requestDto.dateAuctionBuyRequest()?.dateAuctionBuyTo() ?: '')",

Copilot AI Feb 28, 2026

Copy link

Choose a reason for hiding this comment

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

캐시 키에서 #pageRequestDto.page()/size()/sortBy()/direction()의 null 값을 그대로 문자열에 포함하면, 실제 조회는 toPageable()에서 기본값으로 정규화되는데도 요청 형태(null vs 기본값)별로 서로 다른 캐시 엔트리가 생겨 히트율이 떨어집니다. 키를 (#pageRequestDto.page ?: 1), (#pageRequestDto.size ?: 20)처럼 기본값으로 정규화(또는 pageRequestDto.toPageable() 기반으로 키 구성)해 주세요.

Copilot uses AI. Check for mistakes.
@dev-ant dev-ant changed the title feat: 레디스 캐싱 feat: 주요 조회 API 레디스 캐싱 설정 추가 Mar 3, 2026
@dev-ant dev-ant merged commit 40261cb into dev Mar 3, 2026
1 check passed
@dev-ant dev-ant deleted the feat/redie-cache branch March 3, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants