MethodCache.Fody
MethodCache.Fody copied to clipboard
Support IDistributedCache interface (asynchronous)
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);