-
Notifications
You must be signed in to change notification settings - Fork 740
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
More reliable cache operations #732
Comments
|
When the failures are very provider specific I think there are some things that should be mitigated by the cache wrapper for those providers. E.g. Session is a major consumer of distributed cache and it can't know what different sql errors are retry able. Or Redis errors for that matter. That said we have changed Session to suppress most errors, disable session for that individual request, and try again for the next request. |
If SqlConnection has built in support for some of these scenarios, great. So long as it can be configured for the cache. |
We'll need to fail silently instead of throwing exceptions. |
Per discussion with the team, we decided not to implement retry logic/policies. We may add this in the future if we get more feedback that users want API for this. For now we will harden Redis and SqlServer cache implementations to silently fail on all operations, and add logging when an expression is suppressed (#238). |
We discussed more and will be reverting #238. Suppressing errors isn't a sensible default for some caching scenarios, so we'll need introduce API changes. For now, users who want more reliable operations should wrap cache operations in try/catch. |
We'll revisit the design for 2.0.0. |
Seems like this hasn't gotten traction. Closing as it's not likely to be prioritized moving forward. |
As part of discussions while working on aspnet/Session#99, there were proposals for adding logic in caching to make database operations more reliable. For example, sql database operations may fail intermittently. In this case it may be a good idea to add retry logic and allow users to specify retry policies. This probably needs some more design work.
cc @mikeharder @Tratcher @davidfowl
The text was updated successfully, but these errors were encountered: