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

Closed
spring-projects-issues opened this issue Nov 15, 2018 · 1 comment
Labels
in: core status: invalid

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues 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

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues 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.

@spring-projects-issues spring-projects-issues added status: invalid type: enhancement in: core and removed type: enhancement labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: invalid
Projects
None yet
Development

No branches or pull requests

1 participant