Skip to content

Commit

Permalink
[BE] fix: 잘못된 캐시 키 정정 (#1003)
Browse files Browse the repository at this point in the history
* fix: 잘못된 캐시 키 정정

* fix: 잘못된 캐시 키 정정

- reviewGroupId 로

* refactor: cache 삭제
  • Loading branch information
nayonsoso authored Dec 18, 2024
1 parent 1306c7b commit 788dc65
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;
import reviewme.reviewgroup.domain.ReviewGroup;
import reviewme.template.domain.OptionGroup;
import reviewme.template.domain.OptionItem;
import reviewme.template.domain.Question;
import reviewme.template.repository.OptionGroupRepository;
import reviewme.template.repository.OptionItemRepository;
import reviewme.template.repository.QuestionRepository;
import reviewme.reviewgroup.domain.ReviewGroup;
import reviewme.template.domain.Section;
import reviewme.template.domain.SectionQuestion;
import reviewme.template.domain.Template;
import reviewme.template.domain.TemplateSection;
import reviewme.template.repository.OptionGroupRepository;
import reviewme.template.repository.OptionItemRepository;
import reviewme.template.repository.QuestionRepository;
import reviewme.template.repository.SectionRepository;
import reviewme.template.repository.TemplateRepository;
import reviewme.template.service.dto.response.OptionGroupResponse;
Expand All @@ -39,7 +38,6 @@ public class TemplateMapper {
private final OptionGroupRepository optionGroupRepository;
private final OptionItemRepository optionItemRepository;

@Cacheable(value = "template_response", key = "#reviewGroup.templateId")
public TemplateResponse mapToTemplateResponse(ReviewGroup reviewGroup) {
Template template = templateRepository.findById(reviewGroup.getTemplateId())
.orElseThrow(() -> new TemplateNotFoundByReviewGroupException(
Expand Down

0 comments on commit 788dc65

Please sign in to comment.