16 references to AddBasePolicy
Microsoft.AspNetCore.OutputCaching.Tests (14)
OutputCacheMiddlewareTests.cs (3)
817
options.
AddBasePolicy
(build => build.Cache());
865
options.
AddBasePolicy
(build => build.Cache());
925
options.
AddBasePolicy
(build => build.Cache().SetLocking(false));
OutputCachePolicyBuilderTests.cs (5)
333
options.
AddBasePolicy
(build => build.Expire(TimeSpan.FromSeconds(1)));
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)));
371
options.
AddBasePolicy
(build => build.Cache());
OutputCacheTests.cs (6)
286
options.
AddBasePolicy
(b => b.AddPolicy<AllowTestPolicy>());
354
options.
AddBasePolicy
(b => b.SetVaryByQuery("query"));
377
options.
AddBasePolicy
(b => b.SetVaryByQuery("QueryA", "queryb"));
400
options.
AddBasePolicy
(b => b.SetVaryByQuery("*"));
423
options.
AddBasePolicy
(b => b.SetVaryByQuery("QueryB", "QueryA"));
446
options.
AddBasePolicy
(b => b.SetVaryByQuery("*"));
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());