As from Spring Framework 4.1, there is a CacheErrorHandler that you can implement to handle such exceptions. Refer to the javadoc for more details.
You can register it by having your @Configuration class extends CachingConfigurerSupport (see errorHandler()).
Read full article from Spring Cache with Redis - How to gracefully handle or even skip Caching in case of Connection Failure to Redis - Stack Overflow
No comments:
Post a Comment