LRUCache<TKey,TValue> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
儲存的最近最少快取,就像字典一樣。
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) |
取得與指定索引鍵關聯的值。 |