LRUCache<TKey,TValue> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
LRUCache<TKey,TValue>(Int32) |
Constructs a new instance of the LRU cache with a limit based on the number of slots in the cache. |
LRUCache<TKey,TValue>(Int32, Int32, Func<TValue,Int32>) |
Constructs a new instance of the LRU cache with a limit based on the number of slots and a memory size limit. |
LRUCache<TKey,TValue>(Int32)
Constructs a new instance of the LRU cache with a limit based on the number of slots in the cache.
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)>
Parameters
- entryLimit
- Int32
Maximum number of entries on the LRU cache.
Applies to
LRUCache<TKey,TValue>(Int32, Int32, Func<TValue,Int32>)
Constructs a new instance of the LRU cache with a limit based on the number of slots and a memory size limit.
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)>
Parameters
- entryLimit
- Int32
Maximum number of entries on the LRU cache.
- sizeLimit
- Int32
Maximum amount of bytes to keep in memory.
Function that returns the amount of memory that an object of the specified value holds.