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
+[Polly](nuget.org/packages/polly) v5.4.0 or above.
43
+
+[Polly](https://nuget.org/packages/polly) v5.4.0 or above.
39
44
+[Microsoft.Extensions.Caching.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Abstractions/) v1.1.2 or above.
40
45
41
46
@@ -129,6 +134,7 @@ For details of changes by release see the [change log](CHANGELOG.md).
129
134
*[@seanfarrow](https://github.com/seanfarrow) and [@reisenberger](https://github.com/reisenberger) - Initial caching architecture in the main Polly repo
[assembly:CLSCompliant(false)]// Because Microsoft.Extensions.Caching.Memory.IDistributedCache, on which Polly.Caching.IDistributedCache.NetStandard11 depends, is not CLSCompliant.
[assembly:CLSCompliant(false)]// Because Microsoft.Extensions.Caching.Memory.IDistributedCache, on which Polly.Caching.IDistributedCache.NetStandard11 depends, is not CLSCompliant.
/// Gets a value from the memory cache as part of an asynchronous execution. <para><remarks>The implementation is synchronous as there is no advantage to an asynchronous implementation for an in-memory cache.</remarks></para>
46
+
/// Gets a value from the memory cache as part of an asynchronous execution.
/// <param name="continueOnCapturedContext">Whether async calls should continue on a captured synchronization context. <para><remarks>For <see cref="NetStandardIDistributedCacheByteArrayProvider"/>, this parameter is irrelevant and is ignored, as the Microsoft.Extensions.Caching.Distributed.IDistributedCache interface does not support it.</remarks></para></param>
50
-
/// <returns>A <see cref="Task{TResult}" /> promising as Result the value from cache; or null, if none was found.</returns>
/// <param name="continueOnCapturedContext">Whether async calls should continue on a captured synchronization context. <para><remarks>For <see cref="NetStandardIDistributedCacheProvider{TCache}"/>, this parameter is irrelevant and is ignored, as the Microsoft.Extensions.Caching.Distributed.IDistributedCache interface does not support it.</remarks></para></param>
51
+
/// <returns>
52
+
/// A <see cref="Task{TResult}" /> promising as Result a tuple whose first element is a value indicating whether
53
+
/// the key was found in the cache, and whose second element is the value from the cache.
returnreturned==null||returned.Length==0?null:returned;// Because Polly CachePolicy expects providers to return "no value held" as null.
58
+
59
+
byte[]fromCache=await_cache.GetAsync(key
60
+
#if NETSTANDARD2_0
61
+
,cancellationToken
62
+
#endif
63
+
);
64
+
return(fromCache!=null,fromCache);
56
65
}
57
66
58
67
/// <summary>
59
68
/// Puts the specified value in the cache as part of an asynchronous execution.
60
-
/// <para><remarks>The implementation is synchronous as there is no advantage to an asynchronous implementation for an in-memory cache.</remarks></para>
61
69
/// </summary>
62
70
/// <param name="key">The cache key.</param>
63
71
/// <param name="value">The value to put into the cache.</param>
0 commit comments