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