6 references to With
Microsoft.AspNetCore.OutputCaching.Tests (4)
OutputCacheAttributeTests.cs (1)
64
options.AddPolicy("MyPolicy", b => b.
With
(x => false).Cache());
OutputCachePolicyBuilderTests.cs (3)
334
options.AddBasePolicy(build => build.
With
(c => source == 1).Expire(TimeSpan.FromSeconds(2)));
335
options.AddBasePolicy(build => build.
With
(c => source == 2).Expire(TimeSpan.FromSeconds(3)));
353
options.AddBasePolicy(build => build.
With
(c => false).Expire(TimeSpan.FromSeconds(2)));
OutputCachingSample (2)
Startup.cs (2)
12
options.AddBasePolicy(builder => builder.
With
(c => c.HttpContext.Request.Path.StartsWithSegments("/js")).Expire(TimeSpan.FromDays(1)));
13
options.AddBasePolicy(builder => builder.
With
(c => c.HttpContext.Request.Path.StartsWithSegments("/js")).NoCache());