/// <summary> /// Initializes a new instance of the <see cref="TmdbMovieService" /> class. /// </summary> /// <param name="factory">The http client factory.</param> /// <param name="cache">The current cache store.</param> /// <param name="options">The options.</param> public TmdbMovieService(IHttpClientFactory factory, IDistributedCache cache, IOptions <TmdbOptions> options) { this.factory = factory; this.cache = cache; this.options = options.Value; // TODO: Read this from options cacheOptions = new DistributedCacheEntryOptions { SlidingExpiration = TimeSpan.FromMinutes(5d) }; }
public MovieRepository(HttpClient httpClient, IOptions <TmdbOptions> options) { this.httpClient = httpClient; this.tmdbOptions = options.Value; }