Skip to content

feat: 일부 조회 기능에 캐싱 관련 처리 도입 - #224

Draft
kyoooooong wants to merge 1 commit into
developfrom
feat/#218
Draft

feat: 일부 조회 기능에 캐싱 관련 처리 도입#224
kyoooooong wants to merge 1 commit into
developfrom
feat/#218

Conversation

@kyoooooong

Copy link
Copy Markdown
Contributor

📌 Related Issue

#️⃣ 요약 설명

  • 일부 조회 기능에 캐싱 처리를 도입합니다.

📝 작업 내용

  • Task1
  • Task2

👍 동작 확인

  • 내용

💬 리뷰 요구사항(선택)

  • 내용

@kyoooooong kyoooooong self-assigned this Mar 28, 2026
@kyoooooong
kyoooooong marked this pull request as draft March 28, 2026 15:15
@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

변경 사항

  • Chores
    • 캐싱 인프라 지원이 추가되었습니다.

📋 개요

Walkthrough

build.gradle.kts 파일에 Spring Boot 캐시 스타터 의존성(org.springframework.boot:spring-boot-starter-cache)이 추가되었습니다. 기존 Redis 스타터와 함께 캐시 관련 구현 기능을 제공합니다.

Changes

Cohort / File(s) 요약
의존성 추가
build.gradle.kts
Spring Boot 캐시 스타터 의존성 추가 (+3 줄)

🎯 코드 리뷰 난이도

🎯 1 (Trivial) | ⏱️ ~2분

🐰 Poem

의존성 한 줄 추가되니,
캐시의 속도가 달려오네! ⚡
Redis와 함께 손잡고,
조회는 더욱 빠르게~ 🚀

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 현재 변경사항은 캐싱 의존성만 추가했으며, 실제 조회 기능에 캐싱 처리를 적용하는 코드 변경이 부족합니다. 이슈 #218의 요구사항인 '조회 관련 기능 일부 캐싱 처리 도입'을 완료하기 위해 실제 캐시 로직 구현이 필요합니다.
Description check ❓ Inconclusive PR 설명이 템플릿 구조를 따르고 있으나, '작업 내용', '동작 확인', '리뷰 요구사항' 섹션이 불완전합니다. Task1, Task2를 구체적으로 명시하고, 동작 확인 결과와 리뷰 요구사항을 채워주세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 캐싱 관련 처리 도입이라는 주요 변경사항을 명확하게 설명하고 있으며, build.gradle.kts 변경 내용과 일치합니다.
Out of Scope Changes check ✅ Passed build.gradle.kts에 캐시 의존성 추가는 이슈 #218의 범위 내 변경이며 범위를 벗어난 변경사항은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#218

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build.gradle.kts`:
- Around line 77-79: Add caching support by annotating the SmashingApplication
class with `@EnableCaching` so Spring will process
`@Cacheable/`@CacheEvict/@CachePut annotations; update the application-*.yml to
configure cache properties (spring.cache.type, redis.time-to-live,
key-prefix/use-key-prefix and serialization if using Redis) to ensure TTL and
key names are applied when using Redis as the cache store.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e5b2b5ff-f3c2-43ae-be4d-b194a277d747

📥 Commits

Reviewing files that changed from the base of the PR and between b221a11 and 80c0acc.

📒 Files selected for processing (1)
  • build.gradle.kts

Comment thread build.gradle.kts
Comment on lines +77 to +79

// Cache
implementation("org.springframework.boot:spring-boot-starter-cache")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: `@EnableCaching` 어노테이션이 프로젝트 어딘가에 존재하는지 확인

echo "=== `@EnableCaching` 어노테이션 검색 ==="
rg -n "@EnableCaching" --type=kotlin

echo ""
echo "=== 캐시 관련 어노테이션 사용 현황 검색 ==="
rg -n "@Cacheable|@CacheEvict|@CachePut|@Caching" --type=kotlin

echo ""
echo "=== application*.yml 캐시 설정 확인 ==="
rg -n "cache:" src/main/resources/ || echo "캐시 설정 없음"

Repository: TEAM-SMASHING/SMASHING-SERVER

Length of output: 178


🏁 Script executed:

#!/bin/bash
# Verify the spring-boot-starter-cache dependency in build.gradle.kts
echo "=== Checking build.gradle.kts for spring-boot-starter-cache ==="
sed -n '75,85p' build.gradle.kts

echo ""
echo "=== Checking SmashingApplication.kt imports and annotations ==="
head -20 src/main/kotlin/com/smashing/SmashingApplication.kt

echo ""
echo "=== Checking application-local.yml for Redis config ==="
cat src/main/resources/application-local.yml | grep -A 20 "redis:" || echo "No redis config found"

echo ""
echo "=== Checking if any `@Cache`* annotations exist in the entire codebase ==="
rg -r "@(Cacheable|CacheEvict|CachePut|Caching)" --type=kotlin

echo ""
echo "=== List all build.gradle.kts cache-related dependencies ==="
rg "cache|Cache" build.gradle.kts

Repository: TEAM-SMASHING/SMASHING-SERVER

Length of output: 1781


🏁 Script executed:

#!/bin/bash
# Find SmashingApplication.kt
echo "=== Finding SmashingApplication.kt ==="
fd "SmashingApplication.kt" 

echo ""
echo "=== Checking directory structure ==="
find src -type f -name "*.kt" | head -20

echo ""
echo "=== Check project structure ==="
git ls-files | grep -i "application.kt" | head -10

Repository: TEAM-SMASHING/SMASHING-SERVER

Length of output: 1897


🏁 Script executed:

#!/bin/bash
# Read SmashingApplication.kt to verify current state
echo "=== Content of SmashingApplication.kt ==="
cat src/main/kotlin/org/appjam/smashing/SmashingApplication.kt

Repository: TEAM-SMASHING/SMASHING-SERVER

Length of output: 582


@EnableCaching 어노테이션 누락으로 캐싱이 활성화되지 않습니다.

spring-boot-starter-cache 의존성만 추가해서는 캐싱이 동작하지 않습니다. SmashingApplication.kt@EnableCaching 어노테이션을 추가해야 @Cacheable, @CacheEvict, @CachePut 등의 캐시 어노테이션이 실제로 동작합니다.

또한 application-*.yml에 캐시 관련 설정(TTL, 캐시 타입, 직렬화 방식 등)이 없습니다. Redis를 캐시 저장소로 사용할 경우 다음 설정을 추가하세요:

spring:
  cache:
    type: redis
    redis:
      time-to-live: 3600000  # 1시간 (밀리초)
      key-prefix: "smashing:"
      use-key-prefix: true
SmashingApplication.kt에 `@EnableCaching` 추가 예시
 package org.appjam.smashing
 
 import org.springframework.boot.autoconfigure.SpringBootApplication
 import org.springframework.boot.context.properties.ConfigurationPropertiesScan
 import org.springframework.boot.runApplication
 import org.springframework.scheduling.annotation.EnableScheduling
+import org.springframework.cache.annotation.EnableCaching
 
 `@EnableScheduling`
+@EnableCaching
 `@SpringBootApplication`
 `@ConfigurationPropertiesScan`
 class SmashingApplication
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@build.gradle.kts` around lines 77 - 79, Add caching support by annotating the
SmashingApplication class with `@EnableCaching` so Spring will process
`@Cacheable/`@CacheEvict/@CachePut annotations; update the application-*.yml to
configure cache properties (spring.cache.type, redis.time-to-live,
key-prefix/use-key-prefix and serialization if using Redis) to ensure TTL and
key names are applied when using Redis as the cache store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 조회 기능 일부에 캐싱 처리 도입

1 participant