LRUCache<TKey,TValue>.Item[TKey] Property
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.
Retrieves or sets value in the LRU cache
public TValue this[TKey key] { get; set; }
member this.Item('Key) : 'Value with get, set
Parameters
- key
- TKey
Key to lookup
Property Value
Remarks
When getting a value, it will returns null if the value was not found on the cache.
When setting a value if the key was already in the cache, the entry is flagged as recently used. If not, the key is added as the most recently used key. Adding a new key to the cache might cause existing values in the cache to be Disposed, either because of the limit of active entries has been exceeded or because the total amount of byte has been exceeded.