I am currently working on a project which incorporates both spring data redis and Spring Cache. In spring data redis, I am calling redis by using the redis template. I handle all of the exceptions thrown by the redis template in a try catch block as so:
try{
// execute some operation with redis template
}
catch(RedisCommandTimeoutException ex){
}
catch(RedisBusyException ex){
}
catch(RedisConnectionFailureException ex){
}
catch(Exception ex){
}
Can I use a similar try-catch block to handle exceptions coming from @cacheable? how can I handle exceptions thrown by redis in cacheable?