Class NOutputCacheProvider
Implements all methods of the System.Web.Caching.OutputCacheProvider.
Inheritance
Inherited Members
Assembly: Alachisoft.NCache.OutputCacheProvider.dll
Syntax
public class NOutputCacheProvider : OutputCacheProvider
Properties
IsHookAttached
Hooks allow users to group together the output of pages/controls before inserting it into the cache.
Declaration
public static bool IsHookAttached { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns true if the hook is attached. Otherwise, it returns false. |
Methods
Add(String, Object, DateTime)
Adds the specified item into the cache with an expiry time.
Declaration
public override object Add(string key, object entry, DateTime utcExpiry)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A unique identifier for an item. |
System.Object | entry | The content to add to the cache. |
System.DateTime | utcExpiry | The time and date on which the cached item expires. |
Returns
Type | Description |
---|---|
System.Object | The item (object) to be stored in the cache. |
Overrides
Finalize()
Performs application-defined tasks associated with the freeing, releasing, or resetting unmanaged resources.
Declaration
protected void Finalize()
Get(String)
Retrieves the specified item from the cache.
Declaration
public override object Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A unique identifier for a cached item in the output cache. |
Returns
Type | Description |
---|---|
System.Object | The key value that identifies the specified item in the cache, or null if the specified item is not in the cache. |
Overrides
Initialize(String, NameValueCollection)
Initializes the cache.
Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of cache. |
System.Collections.Specialized.NameValueCollection | config | Collection of associated System.String keys and System.String values. |
Overrides
Remove(String)
Removes the specified item from the cache.
Declaration
public override void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Unique key of the item to be removed. |
Overrides
Set(String, Object, DateTime)
Inserts the specified item into the cache, overwriting the item if it is already cached.
Declaration
public override void Set(string key, object entry, DateTime utcExpiry)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A unique identifier for item. |
System.Object | entry | The content to add to the output cache. |
System.DateTime | utcExpiry | The time and date on which the cached item expires. |