MruCache<'Token, 'Key, 'Value> Type
Simple priority caching for a small number of key/value associations. This cache may age-out results that have been Set by the caller. Because of this, the caller must be able to tolerate values that aren't what was originally passed to the Set function. Concurrency: This collection is thread-safe, though concurrent use may result in different threads seeing different live sets of cached items. - areSimilar: Keep at most once association for two similar keys (as given by areSimilar)
Constructors
Constructor | Description |
Full Usage:
MruCache(keepStrongly, areSame, ?isStillValid, ?areSimilar, ?requiredToKeep, ?keepMax)
Parameters:
int
areSame : 'Key * 'Key -> bool
?isStillValid : 'Key * 'Value -> bool
?areSimilar : 'Key * 'Key -> bool
?requiredToKeep : 'Value -> bool
?keepMax : int
Returns: MruCache<'Token, 'Key, 'Value>
|
|
Instance members
Instance member | Description |
Full Usage:
this.Clear
Parameters:
'Token
|
|
Full Usage:
this.ContainsSimilarKey
Parameters:
'Token
key : 'Key
Returns: bool
|
|
Full Usage:
this.RemoveAnySimilar
Parameters:
'Token
key : 'Key
|
|
Full Usage:
this.Resize
Parameters:
'Token
newKeepStrongly : int
?newKeepMax : int
|
|
Full Usage:
this.Set
Parameters:
'Token
key : 'Key
value : 'Value
|
|
Full Usage:
this.TryGet
Parameters:
'Token
key : 'Key
Returns: 'Value option
|
|
Full Usage:
this.TryGetAny
Parameters:
'Token
key : 'Key
Returns: 'Value option
|
|
Full Usage:
this.TryGetSimilar
Parameters:
'Token
key : 'Key
Returns: 'Value option
|
|
Full Usage:
this.TryGetSimilarAny
Parameters:
'Token
key : 'Key
Returns: 'Value option
|