共用方式為


LRUCache<TKey,TValue> 建構函式

定義

多載

LRUCache<TKey,TValue>(Int32)

根據快取中的位置數目限制,建構 LRU 快取的新實例。

LRUCache<TKey,TValue>(Int32, Int32, Func<TValue,Int32>)

根據位置數目和記憶體大小限制,建構具有限制的 LRU 快取新實例。

LRUCache<TKey,TValue>(Int32)

根據快取中的位置數目限制,建構 LRU 快取的新實例。

public LRUCache (int entryLimit);
new MonoTouch.Dialog.Utilities.LRUCache<'Key, 'Value (requires 'Value : null and 'Value :> IDisposable)> : int -> MonoTouch.Dialog.Utilities.LRUCache<'Key, 'Value (requires 'Value : null and 'Value :> IDisposable)>

參數

entryLimit
Int32

LRU 快取上的專案數目上限。

適用於

LRUCache<TKey,TValue>(Int32, Int32, Func<TValue,Int32>)

根據位置數目和記憶體大小限制,建構具有限制的 LRU 快取新實例。

public LRUCache (int entryLimit, int sizeLimit, Func<TValue,int> slotSizer);
new MonoTouch.Dialog.Utilities.LRUCache<'Key, 'Value (requires 'Value : null and 'Value :> IDisposable)> : int * int * Func<'Value, int (requires 'Value : null and 'Value :> IDisposable)> -> MonoTouch.Dialog.Utilities.LRUCache<'Key, 'Value (requires 'Value : null and 'Value :> IDisposable)>

參數

entryLimit
Int32

LRU 快取上的專案數目上限。

sizeLimit
Int32

要保留在記憶體中的位元組數量上限。

slotSizer
Func<TValue,Int32>

函式,傳回指定值物件所保留的記憶體數量。

適用於