• CacheManager
  • Documentation
  • Api Docs
  • MichaCo.net
    Show / Hide Table of Contents

    Class CacheManagerOutputCacheProvider

    Implements a simple System.Web.Caching.OutputCacheProvider which uses a cache manager configured via web.config.

    Inheritance
    Object
    ProviderBase
    OutputCacheProvider
    CacheManagerOutputCacheProvider
    Inherited Members
    ProviderBase.Name
    ProviderBase.Description
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Web
    Assembly:CacheManager.Web.dll
    Syntax
    public class CacheManagerOutputCacheProvider : OutputCacheProvider

    Properties

    | Improve this Doc View Source

    Cache

    Gets the cache.

    Declaration
    public static ICacheManager<object> Cache { get; }
    Property Value
    Type Description
    ICacheManager<Object>

    The cache.

    Exceptions
    Type Condition
    InvalidOperationException

    Output cache provider has not yet been initialized.

    Methods

    | Improve this Doc View Source

    Add(String, Object, DateTime)

    Inserts the specified entry into the output cache.

    Declaration
    public override object Add(string key, object entry, DateTime utcExpiry)
    Parameters
    Type Name Description
    String key

    A unique identifier for entry.

    Object entry

    The content to add to the output cache.

    DateTime utcExpiry

    The time and date on which the cached entry expires.

    Returns
    Type Description
    Object

    A reference to the specified provider.

    Overrides
    OutputCacheProvider.Add(String, Object, DateTime)
    | Improve this Doc View Source

    Get(String)

    Returns a reference to the specified entry in the output cache.

    Declaration
    public override object Get(string key)
    Parameters
    Type Name Description
    String key

    A unique identifier for a cached entry in the output cache.

    Returns
    Type Description
    Object

    The key value that identifies the specified entry in the cache, or null if the specified entry is not in the cache.

    Overrides
    OutputCacheProvider.Get(String)
    | Improve this Doc View Source

    Initialize(String, NameValueCollection)

    Initializes the provider.

    Declaration
    public override void Initialize(string name, NameValueCollection config)
    Parameters
    Type Name Description
    String name

    The friendly name of the provider.

    NameValueCollection config

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

    Overrides
    ProviderBase.Initialize(String, NameValueCollection)
    Exceptions
    Type Condition
    InvalidOperationException

    Might be re thrown.

    | Improve this Doc View Source

    Remove(String)

    Removes the specified entry from the output cache.

    Declaration
    public override void Remove(string key)
    Parameters
    Type Name Description
    String key

    The unique identifier for the entry to remove from the output cache.

    Overrides
    OutputCacheProvider.Remove(String)
    | Improve this Doc View Source

    Set(String, Object, DateTime)

    Inserts the specified entry into the output cache, overwriting the entry if it is already cached.

    Declaration
    public override void Set(string key, object entry, DateTime utcExpiry)
    Parameters
    Type Name Description
    String key

    A unique identifier for entry.

    Object entry

    The content to add to the output cache.

    DateTime utcExpiry

    The time and date on which the cached entry expires.

    Overrides
    OutputCacheProvider.Set(String, Object, DateTime)
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net