20 references to AddPolicy
Microsoft.AspNetCore.OutputCaching (20)
OutputCacheAttribute.cs (1)
80
builder.
AddPolicy
(new NamedPolicy(PolicyName));
OutputCachePolicyBuilder.cs (19)
48
return
AddPolicy
(new TypedPolicy(policyType));
100
return
AddPolicy
(new VaryByQueryPolicy(queryKey, queryKeys));
114
return
AddPolicy
(new VaryByQueryPolicy(queryKeys));
126
return
AddPolicy
(new VaryByHeaderPolicy(headerName, headerNames));
136
return
AddPolicy
(new VaryByHeaderPolicy(headerNames));
148
return
AddPolicy
(new VaryByRouteValuePolicy(routeValueName, routeValueNames));
159
return
AddPolicy
(new VaryByRouteValuePolicy(routeValueNames));
175
return
AddPolicy
(new SetCacheKeyPrefixPolicy(varyByKeyFunc));
191
return
AddPolicy
(new SetCacheKeyPrefixPolicy(varyByKeyFunc));
202
return
AddPolicy
(new SetCacheKeyPrefixPolicy(keyPrefix));
220
return
AddPolicy
(new VaryByValuePolicy(varyByFunc));
236
return
AddPolicy
(new VaryByValuePolicy(varyByFunc));
247
return
AddPolicy
(new VaryByValuePolicy(varyBy));
258
return
AddPolicy
(new TagsPolicy(tags));
267
return
AddPolicy
(new ExpirationPolicy(expiration));
275
public OutputCachePolicyBuilder SetLocking(bool enabled) =>
AddPolicy
(enabled ? LockingPolicy.Enabled : LockingPolicy.Disabled);
286
return
AddPolicy
(EnableCachePolicy.Disabled);
297
AddPolicy
(EnableCachePolicy.Enabled);
308
return
AddPolicy
(enabled ? VaryByHostPolicy.Enabled : VaryByHostPolicy.Disabled);