LRUCache<TKey,TValue> 類別

定義

儲存的最近最少快取,就像字典一樣。

public sealed class LRUCache<TKey,TValue>
type LRUCache<'Key, 'Value> = class
Public NotInheritable Class LRUCache(Of TKey, TValue)

類型參數

TKey

快取專案的索引鍵類型。

TValue

快取專案的型別。

繼承
LRUCache<TKey,TValue>

建構函式

LRUCache<TKey,TValue>()

初始化 LRUCache<TKey,TValue> 類別的新執行個體。

LRUCache<TKey,TValue>(Int32)

初始化 LRUCache<TKey,TValue> 類別的新執行個體。

方法

Set(TKey, TValue)

將指定的索引鍵和值新增至快取。

TryGet(TKey, TValue)

取得與指定索引鍵關聯的值。

適用於