I need 3 separate caches:
- Response with some data
- Null
- Exception
I've already defined the two caches
@Caching(cacheable = {
@Cacheable(value = "SomeCache", key = "#a1", unless = "#result == null"),
@Cacheable(value = "SomeNullCache", key = "#a1", unless = "#result != null")})
So, I have to implement the last case.
JSR-107 provides @CacheResult annotation with exceptionCacheName attribute, but how can I do this using Spring Cache? I don't want to combine JSR-107 and Spring Cache.