Search Results for

    Show / Hide Table of Contents

    Class BaseTableCache

    Defines the basic operations to be performed on the table cache.

    Inheritance
    System.Object
    BaseTableCache
    Namespace: MySql.Data.MySqlClient
    Assembly: MySql.Data.dll
    Version: 9.3.0
    Syntax
    public class BaseTableCache

    Constructors

    BaseTableCache(Int32)

    Declaration
    public BaseTableCache(int maxCacheAge)
    Parameters
    Type Name Description
    System.Int32 maxCacheAge

    Fields

    MaxCacheAge

    The maximum age allowed for cache entries.

    Declaration
    protected int MaxCacheAge
    Field Value
    Type Description
    System.Int32

    Methods

    AddToCache(String, Object)

    Adds the given command and result set to the cache.

    Declaration
    public virtual void AddToCache(string commandText, object resultSet)
    Parameters
    Type Name Description
    System.String commandText

    The command to store in the cache.

    System.Object resultSet

    The resultset associated to the stored command.

    CleanCache()

    Removes cache entries older than the value defined by MaxCacheAge.

    Declaration
    protected virtual void CleanCache()

    Dump()

    Clears the cache.

    Declaration
    public virtual void Dump()

    RemoveFromCache(String)

    Removes the specified command from the cache.

    Declaration
    public void RemoveFromCache(string commandText)
    Parameters
    Type Name Description
    System.String commandText

    The command to remove from the cache.

    RetrieveFromCache(String, Int32)

    Retrieves the specified command from the cache.

    Declaration
    public virtual object RetrieveFromCache(string commandText, int cacheAge)
    Parameters
    Type Name Description
    System.String commandText

    The command to retrieve.

    System.Int32 cacheAge

    The allowed age for the cache entry.

    Returns
    Type Description
    System.Object
    In This Article
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.