티스토리 뷰

공부

[Ehcache] spring

승가비 2022. 6. 28. 02:44
728x90

https://stackoverflow.com/questions/33383366/cacheble-annotation-on-no-parameter-method

 

@Cacheble annotation on no parameter method

I want to have @Cacheable annotation on method with no parameter. In that case, I use @Cacheable as follows @Cacheable(value="usercache", key = "mykey") public string sayHello(){ return "test...

stackoverflow.com

https://stackoverflow.com/questions/48888760/cachable-on-methods-without-input-parameters

 

@Cachable on methods without input parameters?

I'm having a problem with @org.springframework.cache.annotation.Cachable annotation: @Bean public ConcurrentMapCache cache() { return new ConcurrentMapCache(CACHE); } @Cacheable(CACHE) public

stackoverflow.com

spring:
  cache:
    jcache:
      config: classpath:ehcache.xml
@EnableCaching
@Cacheable(value = ["MetaService.find"], key = "{#meta.application, #meta.profile, #meta.label}")
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://www.ehcache.org/v3'
        xmlns:jsr107="http://www.ehcache.org/v3/jsr107"
        xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core.xsd
        http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd">
    <service>
        <jsr107:defaults enable-management="true" enable-statistics="true"/>
    </service>

    <cache-template name="default">
        <resources>
            <heap unit="entries">2000</heap>
        </resources>
    </cache-template>
    <cache alias="MetaService.find" uses-template="default">
        <expiry>
            <ttl unit="seconds">3</ttl>
        </expiry>
    </cache>
</config>
implementation("javax.cache:cache-api:1.1.1")

https://prohannah.tistory.com/88

 

Springboot EhCache 3 - 환경설정부터 self-invocation 처리까지

Ehcache 3 버전을 Spring Boot에 적용해보겠다. Ehcache 3 버전부터는 JSR-107 cache manager를 구현했다고 한다. 참고로 Spring 4.1버전부터 JSR-107 annotations을 강력하게 지원해주기 시작했다. EhCache 2.x..

prohannah.tistory.com

 

728x90

'공부' 카테고리의 다른 글

[avro] enum field null  (0) 2022.07.01
[k8s] ConfigMap "boolean"  (0) 2022.06.28
[ktlint] disabled_rules=experimental:argument-list-wrapping  (0) 2022.06.28
[Athena] SQL COALESCE(a, 0) <-- NVL(a, 0)  (0) 2022.06.28
[Github] Actions  (0) 2022.06.28
댓글