Interface IOutputCacheHook
This interface provides custom hooks which allows the grouping of data along with metadata before storing it in the cache.
Assembly: Alachisoft.NCache.OutputCacheProvider.dll
Syntax
public interface IOutputCacheHook
Methods
Dispose()
It releases resources which are no longer in use by OutputCacheHook.
Declaration
void Dispose()
Initialize()
Initializes the OutputCacheHook.
Declaration
void Initialize()
OnCachingOutput(HttpContext, String, Object, CacheOperation, ref DateTime)
This method functions as a hook between the OutputCache provider and user code. It is called when output is generated by the framework, but before insertion into the cache. Thus, allowing intermediate hooks for user, where additional information can be added with CacheMetadata including Group, Tag, NamedTag and Cache Dependency settings.
Declaration
CacheMetadata OnCachingOutput(HttpContext context, string key, object value, CacheOperation operation, ref DateTime utcExpiry)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContext | context | HTTP-specific information about an HTTP request. |
System.String | key | A unique identifier for entry. |
System.Object | value | The content to add to the output cache. |
CacheOperation | operation | Add or Insert. |
System.DateTime | utcExpiry | Default value (utcExpiry) is already set, user can change it. |
Returns
Type | Description |
---|---|
CacheMetadata | Returns CacheMetadata information. |