20 references to SetAbsoluteExpiration
Microsoft.AspNetCore.Mvc.TagHelpers (1)
DistributedCacheTagHelper.cs (1)
90options.SetAbsoluteExpiration(ExpiresAfter.Value);
Microsoft.Extensions.Caching.SqlServer.Tests (5)
SqlServerCacheWithDatabaseTest.cs (5)
319new DistributedCacheEntryOptions().SetAbsoluteExpiration(relative: TimeSpan.FromSeconds(10))); 372.SetAbsoluteExpiration(relative: absoluteExpirationRelativeToUtcNow)); 581new DistributedCacheEntryOptions().SetAbsoluteExpiration(absoluteExpirationRelativeToNow)); 637new DistributedCacheEntryOptions().SetAbsoluteExpiration(relative: TimeSpan.FromHours(1))); 657new DistributedCacheEntryOptions().SetAbsoluteExpiration(relative: TimeSpan.FromHours(1)));
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (14)
TimeExpirationAsyncTests.cs (7)
62await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 83await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 98await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(-1))); 114await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.Zero)); 128await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 148await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 248.SetAbsoluteExpiration(TimeSpan.FromSeconds(3)));
TimeExpirationTests.cs (7)
45cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 66cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 81cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(-1))); 98cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.Zero)); 112cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 132cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 233.SetAbsoluteExpiration(TimeSpan.FromSeconds(3)));