コード例 #1
0
 public MovieGateway(HttpClient client, IMemoryCache cache, IOptions <MoviesSettings> moviesSettings)//
 {
     this.moviesSettings = moviesSettings.Value;
     cacheEntryOptions   = CreateCacheOptions(this.moviesSettings);
     this.cache          = cache;
     this.client         = client;
 }
コード例 #2
0
 private MemoryCacheEntryOptions CreateCacheOptions(MoviesSettings settings) =>
 CreateCacheOptionsFromTTL(settings.CacheMinutes);