MethodCache.Fody icon indicating copy to clipboard operation
MethodCache.Fody copied to clipboard

Support IDistributedCache interface (asynchronous)

Open Dresel opened this issue 5 years ago • 0 comments

Related to #3.

For the second iteration, the following IDistributedCache methods should be used if the method that is going to be weaved is async. If a CancellationToken is passed to this method it should also be passed to the IDistributedCache methods.

// IDistributedCache interface
public System.Threading.Tasks.Task<byte[]> GetAsync (string key, System.Threading.CancellationToken token = default);

// DistributedCacheExtensions
public static System.Threading.Tasks.Task SetAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value, System.Threading.CancellationToken token = default);

Dresel avatar Nov 06 '20 13:11 Dresel