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>

返回指定值的对象所保留的内存量的函数。

适用于