From 29e6380b09908033711d8a7164c606b65bdff52d Mon Sep 17 00:00:00 2001 From: tlarbals824 Date: Thu, 25 May 2023 20:34:48 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20response=20dto=EC=97=90=20=EB=8F=99?= =?UTF-8?q?=EC=A0=81=20=ED=95=84=EB=93=9C=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20?= =?UTF-8?q?=EC=BA=90=EC=8B=B1=20=EB=AC=B8=EC=A0=9C=EB=A1=9C=20=EC=BA=90?= =?UTF-8?q?=EC=8B=B1=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../album/presentation/AlbumController.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/kusitms/samsion/domain/album/presentation/AlbumController.java b/src/main/java/com/kusitms/samsion/domain/album/presentation/AlbumController.java index 0ff4692..57f8ca9 100644 --- a/src/main/java/com/kusitms/samsion/domain/album/presentation/AlbumController.java +++ b/src/main/java/com/kusitms/samsion/domain/album/presentation/AlbumController.java @@ -1,17 +1,5 @@ package com.kusitms.samsion.domain.album.presentation; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.domain.Pageable; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import com.kusitms.samsion.common.consts.CachingStoreConst; import com.kusitms.samsion.common.slice.SliceResponse; import com.kusitms.samsion.domain.album.application.dto.request.AlbumCreateRequest; import com.kusitms.samsion.domain.album.application.dto.request.AlbumSearchRequest; @@ -22,8 +10,9 @@ import com.kusitms.samsion.domain.album.application.service.AlbumDeleteUseCase; import com.kusitms.samsion.domain.album.application.service.AlbumReadUseCase; import com.kusitms.samsion.domain.album.application.service.AlbumUpdateUseCase; - import lombok.RequiredArgsConstructor; +import org.springframework.data.domain.Pageable; +import org.springframework.web.bind.annotation.*; /** * TODO : 공감, 댓글, 이미지 정보도 같이 가져와야 함 @@ -64,7 +53,6 @@ public AlbumInfoResponse createAlbum(@ModelAttribute AlbumCreateRequest request) * 캐시 미적용 : 3회 warmup 4회 테스트 평균 40ms * 캐시 적용 : 3회 warmup 4회 테스트 평균 20ms */ - @Cacheable(value = CachingStoreConst.ALBUM_CACHE_NAME, key = "#albumId") @GetMapping("/{albumId}") public AlbumInfoResponse getAlbum(@PathVariable Long albumId){ return albumReadUseCase.getAlbum(albumId); @@ -74,7 +62,6 @@ public AlbumInfoResponse getAlbum(@PathVariable Long albumId){ * 비동기 실행 : 100회 요청 4s82ms * 동기 실행 : 100회 */ - @CacheEvict(value = CachingStoreConst.ALBUM_CACHE_NAME, key = "#albumId") @PostMapping("/{albumId}") public void updateAlbum(@PathVariable Long albumId, @ModelAttribute AlbumUpdateRequest request){ albumUpdateUseCase.updateAlbum(albumId, request);