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.
A least-recently-used cache stored like a dictionary.
public sealed class LRUCache<TKey,TValue>
type LRUCache<'Key, 'Value> = class
Public NotInheritable Class LRUCache(Of TKey, TValue)
Type Parameters
- TKey
The type of the key to the cached item.
- TValue
The type of the cached item.
- Inheritance
-
LRUCache<TKey,TValue>
Constructors
LRUCache<TKey,TValue>() |
Initializes a new instance of the LRUCache<TKey,TValue> class. |
LRUCache<TKey,TValue>(Int32) |
Initializes a new instance of the LRUCache<TKey,TValue> class. |
Methods
Set(TKey, TValue) |
Adds the specified key and value to the cache. |
TryGet(TKey, TValue) |
Gets the value associated with the specified key. |