LeastRecentlyUsedCache<KT,VT> 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.
public class LeastRecentlyUsedCache<KT,VT> where VT : LRUValue<KT>
type LeastRecentlyUsedCache<'KT, 'VT (requires 'VT :> LRUValue<'KT>)> = class
Public Class LeastRecentlyUsedCache(Of KT, VT)
Type Parameters
- KT
- VT
- Inheritance
-
LeastRecentlyUsedCache<KT,VT>
Constructors
| Name | Description |
|---|---|
| LeastRecentlyUsedCache<KT,VT>(Int32, Boolean) |
Create LRU cache with specified capacity |
Methods
| Name | Description |
|---|---|
| AddOrUpdateValue(KT, VT, Boolean) |
Add or update a value in the cache with associated key. |
| Clear() | |
| ContainsKey(KT) |
See if a value for a particular key exists in the cache. |
| FindByKey(KT) |
Find and return value by its key and make newest. |
| IsEmpty() | |
| PeekOldestValue() |
Get the value of the oldest item. |
| PopByKey(KT) |
Get a particular value from the cache and remove it from the cache. |
| SetSize(Int32, Boolean) |
Change the size of the cache. |
| TryRemove(KT) |
If a key is in the LRU cache, remove the value. |