private Task <ApplicationInfo> GetApplicationInfo(Guid applicationUuid) => cache.GetOrCreateAsync(applicationUuid, async entry => { var retrier = new MAuthRequestRetrier(options); var response = await retrier.GetSuccessfulResponse( applicationUuid, CreateRequest, requestAttempts: (int)options.MAuthServiceRetryPolicy + 1 ).ConfigureAwait(false); var result = await response.Content.FromResponse().ConfigureAwait(false); entry.SetOptions( new MemoryCacheEntryOptions() .SetAbsoluteExpiration(response.Headers.CacheControl?.MaxAge ?? TimeSpan.FromHours(1)) ); return(result); });
private async Task <ApplicationInfo> GetApplicationInfo(Guid applicationUuid) => await(await retrier.GetSuccessfulResponse(applicationUuid, CreateRequest, remainingAttempts: (int)options.MAuthServiceRetryPolicy + 1)) .Content .FromResponse();