일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 자바
- 백준
- Spring Authorization Server
- openTelemetry
- github
- 프로그래머스
- amazon-ecr-login
- 14891
- Session Fixation Protection
- Java
- 17144
- HttpRequestMethodNotSupportedException
- AWS
- RestControllerAdvice
- 14889
- RequiredArgsConstructor
- github actions
- 1916
- Spring Security
- Value annotation
- aws-mysql-jdbc
- ConcurrentSessionControlAuthenticationStrategy
- 12100
- self-hosted runners
- 15686
- 1260
- Spring
- tailsamplingprocessor
- Session Registry
- SpringCloudConfig
Archives
- Today
- Total
한울이
[SPRING] Spring Cacheable 본문
회사에서 자주 조회하는 정보를 캐시(redis 사용)에 저장해서 쓰려고
Cacheable annotation 을 사용하였다.
Cacheable를 적용시킨 메소드를 호출하고 redis를 확인했는데
캐싱이 되지않고 있었다.
로그를 보니 condition에서 계속 실패해서 캐싱을 하지않았다.
document를 찾아보니 결과값(#result)을 caching 조건에 사용하려면
condition 파라미터 말고 unless 파라미터를 사용해야 한다는 것을 알았다.
'PROGRAMMING' 카테고리의 다른 글
[SPRING] Lombok @RequiredArgsConstructor @Qualifier (0) | 2022.08.21 |
---|---|
[SPRING] @RestControllerAdvice can not handle HttpRequestMethodNotSupportedException (0) | 2022.08.21 |
[SPRING] Spring Cloud Config override (0) | 2022.08.21 |
[SPRING] Spring Reactive Programming (0) | 2022.08.20 |
[APM] Scouter (0) | 2022.08.20 |
Comments