11 references to Expire
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheAttribute.cs (1)
114builder.Expire(TimeSpan.FromSeconds(_duration.Value));
Microsoft.AspNetCore.OutputCaching.Tests (8)
OutputCacheAttributeTests.cs (1)
49options.AddPolicy("MyPolicy", b => b.Expire(TimeSpan.FromSeconds(42)));
OutputCachePolicyBuilderTests.cs (7)
36var policy = builder.Expire(TimeSpan.FromSeconds(duration)).Build(); 61options.AddPolicy(name, b => b.Expire(TimeSpan.FromSeconds(duration))); 79options.AddPolicy(name, b => b.Expire(TimeSpan.FromSeconds(duration)), true); 333options.AddBasePolicy(build => build.Expire(TimeSpan.FromSeconds(1))); 334options.AddBasePolicy(build => build.With(c => source == 1).Expire(TimeSpan.FromSeconds(2))); 335options.AddBasePolicy(build => build.With(c => source == 2).Expire(TimeSpan.FromSeconds(3))); 353options.AddBasePolicy(build => build.With(c => false).Expire(TimeSpan.FromSeconds(2)));
OutputCachingSample (2)
Startup.cs (2)
12options.AddBasePolicy(builder => builder.With(c => c.HttpContext.Request.Path.StartsWithSegments("/js")).Expire(TimeSpan.FromDays(1))); 55}).CacheOutput(p => p.SetLocking(false).Expire(TimeSpan.FromMilliseconds(1)));