AsyncCacheEngine
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace Polly.Caching
{
    internal static class AsyncCacheEngine
    {
        [System.Runtime.CompilerServices.NullableContext(1)]
        [AsyncStateMachine(typeof(<ImplementationAsync>d__0<>))]
        [System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
        internal static Task<TResult> ImplementationAsync<[System.Runtime.CompilerServices.Nullable(2)] TResult>(IAsyncCacheProvider<TResult> cacheProvider, ITtlStrategy<TResult> ttlStrategy, Func<Context, string> cacheKeyStrategy, Func<Context, CancellationToken, Task<TResult>> action, Context context, bool continueOnCapturedContext, Action<Context, string> onCacheGet, Action<Context, string> onCacheMiss, Action<Context, string> onCachePut, [System.Runtime.CompilerServices.Nullable(new byte[] {
            2,
            1,
            1,
            1
        })] Action<Context, string, Exception> onCacheGetError, [System.Runtime.CompilerServices.Nullable(new byte[] {
            2,
            1,
            1,
            1
        })] Action<Context, string, Exception> onCachePutError, CancellationToken cancellationToken)
        {
            <ImplementationAsync>d__0<TResult> stateMachine = default(<ImplementationAsync>d__0<TResult>);
            stateMachine.<>t__builder = AsyncTaskMethodBuilder<TResult>.Create();
            stateMachine.cacheProvider = cacheProvider;
            stateMachine.ttlStrategy = ttlStrategy;
            stateMachine.cacheKeyStrategy = cacheKeyStrategy;
            stateMachine.action = action;
            stateMachine.context = context;
            stateMachine.continueOnCapturedContext = continueOnCapturedContext;
            stateMachine.onCacheGet = onCacheGet;
            stateMachine.onCacheMiss = onCacheMiss;
            stateMachine.onCachePut = onCachePut;
            stateMachine.onCacheGetError = onCacheGetError;
            stateMachine.onCachePutError = onCachePutError;
            stateMachine.cancellationToken = cancellationToken;
            stateMachine.<>1__state = -1;
            stateMachine.<>t__builder.Start(ref stateMachine);
            return stateMachine.<>t__builder.Task;
        }
    }
}