LRUCache<TKey,TValue> Class
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.
Implements a Least Recently Used Cache
public class LRUCache<TKey,TValue> where TValue : class, IDisposable
type LRUCache<'Key, 'Value (requires 'Value : null and 'Value :> IDisposable)> = class
Type Parameters
- TKey
The type of key for the LRU cache.
- TValue
The type for the values of the LRU cache.
- Inheritance
-
LRUCache<TKey,TValue>
Constructors
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. |
Properties
Item[TKey] |
Retrieves or sets value in the LRU cache |
Methods
Purge() |
Purges the cache, and calls Dispose on all of the elements of the cache. |
ToString() |