Maria GDK 4.7.0.84
Documentation of managed code in develop branch
Loading...
Searching...
No Matches
TPG.Primitives.LruCache< TKey, TValue > Class Template Reference

Generic Last Recently Used cache optimised for read and infrequent automatic trim operations. Implements relevant parts of IDictionary. More...

Classes

class  ValueWrapper
 

Public Member Functions

 LruCache (uint maxSize=5000, uint trimToSize=2500)
 
TValue GetValueOrDefault (TKey key, TValue defaultValue)
 
TValue GetOrAdd (TKey key, Func< TValue > factory)
 
void Add (TKey key, TValue value)
 
bool ContainsKey (TKey key)
 
bool Remove (TKey key)
 
bool TryGetValue (TKey key, out TValue value)
 
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
 
void Add (KeyValuePair< TKey, TValue > item)
 
void Clear ()
 

Public Attributes

readonly uint MaxSize
 
readonly uint TrimToSize
 

Properties

TValue this[TKey key] [get, set]
 
ICollection< TKey > Keys [get]
 
ICollection< TValue > Values [get]
 
int Count [get]
 
bool IsReadOnly [get]
 

Detailed Description

Generic Last Recently Used cache optimised for read and infrequent automatic trim operations. Implements relevant parts of IDictionary.

Template Parameters
TKeyKey type
TValueValue type
Type Constraints
TValue :class 

The documentation for this class was generated from the following file: