CacheStoreProvider 類別

定義

針對任何想要插入來做為 MemoryCache 所使用的預設物件快取實作的快取存放區,提供所需的基底介面。Provides the base interface required of any cache store that wants to be plugged in as the default object cache implementation used by MemoryCache.

public ref class CacheStoreProvider abstract : System::Configuration::Provider::ProviderBase, IDisposable
public abstract class CacheStoreProvider : System.Configuration.Provider.ProviderBase, IDisposable
type CacheStoreProvider = class
    inherit ProviderBase
    interface IDisposable
Public MustInherit Class CacheStoreProvider
Inherits ProviderBase
Implements IDisposable
繼承
CacheStoreProvider
實作

建構函式

CacheStoreProvider()

初始化這個類別的新執行個體。Initializes a new instance of this class.

屬性

Description

取得簡短、易讀的描述,適合顯示在管理工具或其他使用者介面 (UI) 中。Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).

(繼承來源 ProviderBase)
ItemCount

取得快取中所儲存的項目數。Gets the number of items stored in the cache.

Name

取得用來在設定期間代表提供者的易記名稱。Gets the friendly name used to refer to the provider during configuration.

(繼承來源 ProviderBase)
SizeInBytes

取得快取的估計大小 (以位元組為單位)。Gets the approximate size in bytes of the cache.

方法

Add(String, Object, CacheInsertOptions)

使用選項,將指定的項目加入至快取。Adds the specified item to the cache with options.

AddDependent(String, CacheDependency, DateTime)

將相依實體加入至快取。Adds a dependant entity to the cache.

Dispose()

釋放快取物件的目前執行個體所使用的所有資源。Releases all resources that are used by the current instance of the cache object.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Get(String)

從快取擷取指定的項目 (如果存在)。Retrieves the specified item from the cache if it exists.

GetEnumerator()

擷取字典列舉程式,用來逐一查看金鑰設定及其在快取中所包含的值。Retrieves a dictionary enumerator used to iterate through the key settings and their values contained in the cache.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
Initialize(String, NameValueCollection)

初始化具名的快取。Initializes the named cache.

Insert(String, Object, CacheInsertOptions)

將物件和相依性插入快取中。Inserts an object and dependencies into the cache.

MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
Remove(String)

移除快取中的項目。Removes the item from the cache.

Remove(String, CacheItemRemovedReason)

從快取移除指定的項目 (如果存在)。Removes the specified item from the cache if it exists.

RemoveDependent(String, CacheDependency)

移除指定的相依性。Removes the specified dependency.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
Trim(Int32)

移除指定百分比的快取項目。Removes a specified percentage of cache entries.

適用於