OutputCacheProviderCollection.Add(ProviderBase) Method

Definition

Inserts a provider into the collection of output-cache providers.

C#
public override void Add(System.Configuration.Provider.ProviderBase provider);

Parameters

provider
ProviderBase

An output cache provider.

Exceptions

provider is null.

provider is not of type OutputCacheProvider.

Remarks

The Add method adds only providers that are specified in the configuration for a Web site. Therefore, it does not add the ASP.NET default provider for the in-memory output cache.

This collection is read-only. It is populated one time based on the providers that are specified in configuration. After the collection is populated, you cannot modify the set of available providers.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1