You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Love the library. We are use it all over the place and are looking to plug Microsoft's HybridCache in for a bit of caching in hot spots. However, the Value property of a successful Result<T> is null after retrieving it from the cache.
Of course we could cache the underlying value, but then we need to essentially turn a failed Result<T> into an exception, handle the exception, and turn it back into a failed Result<T>, which feels a bit tedious if we're OK with caching failed results in some cases.
The text was updated successfully, but these errors were encountered:
Hi there. Love the library. We are use it all over the place and are looking to plug Microsoft's HybridCache in for a bit of caching in hot spots. However, the
Value
property of a successfulResult<T>
isnull
after retrieving it from the cache.I've reproduced the issue here:
https://github.com/nwoolls/spl-fluentresults-caching-value-lost
Of course we could cache the underlying value, but then we need to essentially turn a failed
Result<T>
into an exception, handle the exception, and turn it back into a failedResult<T>
, which feels a bit tedious if we're OK with caching failed results in some cases.The text was updated successfully, but these errors were encountered: