Setting expiration for IDistributedCache.SetAsync while using AddDistributedRedisCache
问题 I am using .net core api (2.1) with aws redis cache. I don't see a way to set expiration to the IDistributedCache.SetAsync. How is it possible? My code segment is below: // Startup.cs public void ConfigureServices(IServiceCollection services) { services.AddDistributedRedisCache(options => { var redisCacheUrl = Configuration["RedisCacheUrl"]; if (!string.IsNullOrEmpty(redisCacheUrl)) { options.Configuration = redisCacheUrl; } }); } //Set & GetCache public async Task<R> GetInsights<R>(string