Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

[#45] Item 조회 메서드에 대한 로컬캐싱 적용 #46

Open
wants to merge 1 commit into
base: feature/26
Choose a base branch
from

Conversation

jjeda
Copy link
Collaborator

@jjeda jjeda commented Jan 14, 2020

  • ehcache 적용
  • getItem() 메서드에 대한 캐시적용 및 refresh 용 메서드생성

- ehcache 적용
- getItem() 메서드에 대한 캐시적용 및 refresh 용 메서드생성
@jjeda jjeda requested a review from f-lab-dev January 14, 2020 07:58
@jjeda jjeda self-assigned this Jan 14, 2020
@@ -31,10 +35,14 @@ public Item saveItem(ItemDto itemDto) {
}

@Transactional(readOnly = true)
@Cacheable(value = "findItemCache",key ="#itemId")
public Optional<Item> getItem(Long itemId) {
Copy link
Member

Choose a reason for hiding this comment

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

이곳에 캐싱을 걸어준 이유가 같이 들어있으면 좋을 것 같습니다~

eternal="false"
diskSpoolBufferSizeMB="20"
timeToIdleSeconds="300" timeToLiveSeconds="600"
memoryStoreEvictionPolicy="LFU"
Copy link
Member

Choose a reason for hiding this comment

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

LRU가 아니라 LFU를 사용한 이유가 있으실까요?

updateCheck="false">
<diskStore path="java.io.tmpdir" />

<cache name="findItemCache"
Copy link
Member

Choose a reason for hiding this comment

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

각 옵션에 대한 설명과 사용 이유도 주석으로 있으면 좋을 것 같습니다.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants