Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to ignore exceptions when using @Cacheable annotation [SPR-17504] #22036

spring-issuemaster opened this issue Nov 15, 2018 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Nov 15, 2018

Gökhan Öner opened SPR-17504 and commented

When using distributed caching solutions, the cache could be unavailable for any reason. Instead of throwing an exception, to increase availability, an attribute can be added to Cacheable annotation like in the Transactional rollbackFor, and if defined these exceptions thrown by underlying cache managers can be ignored bot both get/put & method can be called directly, without caching the result.


Circuit Breaker pattern could be used here but you need to provide for each method & implement an additional method. This seems more fluent.

No further details from SPR-17504


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 16, 2018

Stéphane Nicoll commented

CacheConfigurer allows to specify a CacheErrorHandler that allows you to handle those provider specific exception. If that doesn't help you, please share a sample that showcases the problem and we can reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.