티스토리 뷰

공부

[Spring] @Cacheable

승가비 2020. 3. 15. 20:20
728x90
@Cacheable(value = "menuCache", key = "#auth")

ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
         updateCheck="true"
         monitoring="autodetect"
         dynamicConfig="true">

    <diskStore path="io.dveamer.sample.ehcache"/>

    <defaultCache
            maxElementsInMemory="10000"
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="true"
            maxElementsOnDisk="10000000"
            diskPersistent="false"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LRU"
    />
    
    <cache name="menuCache"
           maxElementsInMemory="10"
           eternal="false"
           overflowToDisk="false"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LRU" />
</ehcache>

http://dveamer.github.io/backend/SpringCacheable.html

 

Dveamer

현실에서 살고 있지만 이상에 대한 꿈을 버리지 못한 몽상가의 홈페이지 입니다. 개인적인 기록을 주 목적으로 하며 일상과 프로그래밍 관련 글을 포스팅합니다.

dveamer.github.io

 

 

### For Spring Boot

- https://stackoverflow.com/questions/28020245/cannot-find-cache-named-for-cacheableoperation-caches

 

Cannot find cache named '' for CacheableOperation[] caches

My error is : Exception in thread "main" java.lang.IllegalArgumentException: Cannot find cache named 'getActionsBycasId' for CacheableOperation[public java.util.List com.codinko.database.

stackoverflow.com

- https://stackoverflow.com/questions/32994544/spring-cacheable-not-caching/32999744

 

Spring @Cacheable not caching

Using Spring 3.2 with EhCache 2.9. I've annotated a zero-parameter method as follows: @Cacheable(value="myList", key="#result.method.name") protected List getMyList() { //db que...

stackoverflow.com

- https://javabeat.net/spring-cache/

 

Spring Cache Tutorial

This tutorial explains spring cache and how to work with different cache implementations. This tutorial also provides simple examples.

javabeat.net

- https://jaehun2841.github.io/2018/11/07/2018-11-04-ehcache-config-for-springboot/#ehcache-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0

 

EHCache 설정방법 (Spring Boot) | Carrey`s 기술블로그

EHCache 설정하기 설정 순서는 아래와 같다. Maven Dependency 설정 Ehcache.xml 작성 (ehcache 설정파일) @EnableCaching 설정 Maven Dependency 설정 123456789 org.springframework.boot spring-boot-starter-cache net.sf.ehcache ehcache 2.10.6 Ehcache.xml 작성 (ehcache 설정파일) 1234567891011121314

jaehun2841.github.io

https://stackoverflow.com/questions/49394403/ehcache-2-x-spring-boot-not-working

 

ehcache 2.x + spring boot not working

I am trying to apply ehcache on my spring boot application. Here is my code. pom.xml net.sf.ehcache <artifacti...< p=""> </artifacti...<>

stackoverflow.com

https://sonegy.wordpress.com/2011/12/29/spring-3-1%EA%B3%BC-ehcache/

 

Spring 3.1과 ehcache

현재 프로젝트는 Spring 3.0.5에 iBatis 캐쉬를 켜서 쓰고 있다.누구도 iBatis에 내장 되어 있는 캐쉬 모델은 추천을 하지도 않고, 게다가 개발PC에서 올리고 한참후 지나면 vm이 멈추는 기현상이 발생이

sonegy.wordpress.com

http://egloos.zum.com/js7309/v/11143838

 

[JAVA]EhCache

Ehcache레퍼런스의 근원(Locality of Reference)기존 전통적인 경제법칙으로 유명한 파레토의 법칙은 상위 20퍼센트가 매출액의 80퍼센트를 점한다는 법칙이다.예를 들어 2000만원 하는 자동차를 80명이 ��

egloos.zum.com

 

728x90
댓글