/// <summary> /// Initializes a new instance of the <see cref="OmdbMovieService"/> 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 OmdbMovieService(IHttpClientFactory factory, IDistributedCache cache, IOptions <OmdbOptions> options) { this.factory = factory; this.cache = cache; this.options = options.Value; // TODO: Read this from options cacheOptions = new DistributedCacheEntryOptions { SlidingExpiration = TimeSpan.FromMinutes(5d) }; }
public OmdbMovieService(OmdbOptions omdbOptions) { _apiKey = omdbOptions.ApiKey; }