[#70] 중복 조회 로직에 로컬 캐시 도입 #71

Merged
pricelees merged 4 commits from refactor/#70 into main 2025-10-17 10:47:15 +00:00
4 changed files with 12 additions and 0 deletions
Showing only changes of commit cf90f0fb91 - Show all commits

View File

@ -8,6 +8,10 @@ dependencies {
// API docs
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.13")
// Cache
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("com.github.ben-manes.caffeine:caffeine")
// DB
runtimeOnly("com.h2database:h2")
runtimeOnly("com.mysql:mysql-connector-j")

View File

@ -3,8 +3,10 @@ package com.sangdol.roomescape
import org.springframework.boot.Banner
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.cache.annotation.EnableCaching
import java.util.*
@EnableCaching
@SpringBootApplication(
scanBasePackages = ["com.sangdol.roomescape", "com.sangdol.common"]
)

View File

@ -16,6 +16,9 @@ spring:
jdbc:
batch_size: ${JDBC_BATCH_SIZE:100}
order_inserts: true
cache:
type: caffeine
cache-names: ${CACHE_NAMES:theme-details}
management:
endpoints:

View File

@ -18,6 +18,9 @@ spring:
init:
mode: always
schema-locations: classpath:schema/schema-mysql.sql
cache:
type: caffeine
cache-names: ${CACHE_NAMES:theme-details}
security:
jwt: