This documentation is archived and is not being maintained.

OutputCacheProviderCollection::Add Method

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

Namespace:  System.Web.Caching
Assembly:  System.Web (in System.Web.dll)

public:
virtual void Add(
	ProviderBase^ provider
) override

Parameters

provider
Type: System.Configuration.Provider::ProviderBase
An output cache provider.

ExceptionCondition
ArgumentNullException

provider is nullptr.

ArgumentException

provider is not of type OutputCacheProvider.

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.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: