New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

This Class defines AppDataCacheProvider that inherits WebResourceCacheProvider.

Definition

Constructors

C#
public AppDataCacheProvider()

Methods

Checks whether the given unique key and URL are associated in cache.

C#
public override bool AreAssociated(string pageKey, string resourceUid)
Parameters:pageKeystring

The unique key with which the URL will be associated. The key is usually a unique identifier of a web page.

resourceUidstring

The URL of the requested combination of web resources.

Returns:

bool

True if the key and URL are associated in cache; false otherwise.

Overrides: WebResourceCacheProvider.AreAssociated(string, string)

Associates the given unique key with a URL of a combination of web resources. One key can have many URLs associated with it.

C#
public override void Associate(string pageKey, string resourceUid)
Parameters:pageKeystring

The unique key with which the URL will be associated. The key is usually a unique identifier of a web page.

resourceUidstring

The URL of the requested combination of web resources.

Overrides: WebResourceCacheProvider.Associate(string, string)

Checks whether there is an entry for the requested URL in the cache.

C#
public override bool Exists(string resourceUid)
Parameters:resourceUidstring

The URL of the requested combination of web resources.

Returns:

bool

True if there is an entry in the cache; false otherwise.

Overrides: WebResourceCacheProvider.Exists(string)

Gets the combined web resources output from cache for a given URL. The method reads the content of the entry in the cache. If you want to verify whether an entry exists, use the Exists method.

C#
public override string Get(string resourceUid)
Parameters:resourceUidstring

The URL of the requested combination of web resources.

Returns:

string

The combined output of the requested web resources from the cache. Returns null if there is no entry for the requested URL in the cache.

Overrides: WebResourceCacheProvider.Get(string)

If the provider is created with code, put the initialization logic of the provider in this method. Optionally you can set the IsInitialized property to true after the initialization finishes. The ScriptCacheProviderManager calls this method when the Provider property is set if the IsInitialized property of the provider returns false.

C#
public override void Initialize()

Overrides: WebResourceCacheProvider.Initialize()

Initializes the provider.

C#
public override void Initialize(string name, NameValueCollection config)
Parameters:namestring

The friendly name of the provider.

configNameValueCollection

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Exceptions: ArgumentNullException

The name of the provider is null.

ArgumentException

The name of the provider has a length of zero.

InvalidOperationException

An attempt is made to call Initialize(string, NameValueCollection) on a provider after the provider has already been initialized.

Overrides: ProviderBase.Initialize(string, NameValueCollection)

Initializes the specified app data relative path.

C#
public void Initialize(string appDataRelativePath)
Parameters:appDataRelativePathstring

The app data relative path.

Clears the cache.

C#
public override void Invalidate()

Overrides: WebResourceCacheProvider.Invalidate()

Deletes all URL entries for the given key from cache.

C#
public override void Invalidate(string pageKey)
Parameters:pageKeystring

The unique key with which URLs are associated. (The key is usually a unique identifier of a web page.)

Overrides: WebResourceCacheProvider.Invalidate(string)

Stores the combined web resources output for a given unique URL in cache.

C#
public override void Store(string resourceUid, string output)
Parameters:resourceUidstring

The unqiue URL of the requested combination of web resources.

outputstring

The combined output of the requested web resources.

Overrides: WebResourceCacheProvider.Store(string, string)