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

This abstract class defines the WebResourceCacheProvider object that inherits ProviderBase.

Definition

Constructors

C#
protected WebResourceCacheProvider()

Properties

Gets or sets the is initialized.

C#
public bool IsInitialized { get; protected set; }
Property Value:

The is initialized.

Methods

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

C#
public abstract 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.

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 abstract 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.

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

C#
public abstract 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.

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 abstract 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.

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 abstract void Initialize()

Clears the cache.

C#
public abstract void Invalidate()

Deletes all URL entries for the given key from cache.

C#
public abstract 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.)

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

C#
public abstract 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.