Edit

Share via


OutputCacheProviderCollection.Add(ProviderBase) Method

Definition

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

public:
 override void Add(System::Configuration::Provider::ProviderBase ^ provider);
public override void Add (System.Configuration.Provider.ProviderBase provider);
override this.Add : System.Configuration.Provider.ProviderBase -> unit
Public Overrides Sub Add (provider As ProviderBase)

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