What happens when you throw an exception inside the GetOrSetAsync Factory ? #557
Replies: 1 comment
-
|
Hi @Samirasimha
Short answerNothing, because the factory did not in fact produce any value. Longer answerSee above, but also: if you enabled Fail-Safe, it depends. Basically, when the exception is thrown:
Sure thing, if you take a look at the Fail-Safe docs I linked above, that would be the best way to deal with transient issues (meaning: temporary problems with your datasource (database/service/etc). On top of handling exceptions when calling To do that, you can take a look at Factory Timeouts. Finally, if you want to have an overview of all the main features of FusionCache and what they can bring you, also in terms of before/after numbers, you can take a look at the Step By Step. It's a bit long, so maybe bring a cup of coffee/tea 😅 Hope this helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In this case if the GetOrg fails for whatever reason and an exception is thrown,
What gets set in the cache ?
Will the exception be cached or nothing gets cached at all ?
What will data hold ?
Any tips on best practices on handling this situation while using Fusion Cache ?
Beta Was this translation helpful? Give feedback.
All reactions