Class ThreadwiseKeyCache<Item>
The purpose of this class is to contain a cache of items, with a separate cache per thread.
The use case is that some class needs to maintain a unique list of items, uses a cache for this,
and wants the list to be kept separate for each thread - even if the instance of the cache and/or client class is
the same.
Inheritance
ThreadwiseKeyCache<Item>
Assembly: SoCore.dll
Syntax
public class ThreadwiseKeyCache<Item>
Type Parameters
Constructors
ThreadwiseKeyCache()
The purpose of this class is to contain a cache of items, with a separate cache per thread.
The use case is that some class needs to maintain a unique list of items, uses a cache for this,
and wants the list to be kept separate for each thread - even if the instance of the cache and/or client class is
the same.
Declaration
public ThreadwiseKeyCache()
ThreadwiseKeyCache(int)
The purpose of this class is to contain a cache of items, with a separate cache per thread.
The use case is that some class needs to maintain a unique list of items, uses a cache for this,
and wants the list to be kept separate for each thread - even if the instance of the cache and/or client class is
the same.
Declaration
public ThreadwiseKeyCache(int defaultAllocationSize)
Parameters
Type |
Name |
Description |
int |
defaultAllocationSize |
|
Methods
Add(Item)
The purpose of this class is to contain a cache of items, with a separate cache per thread.
The use case is that some class needs to maintain a unique list of items, uses a cache for this,
and wants the list to be kept separate for each thread - even if the instance of the cache and/or client class is
the same.
Declaration
public bool Add(Item item)
Parameters
Type |
Name |
Description |
Item |
item |
|
Returns
ContainsKey(Item)
The purpose of this class is to contain a cache of items, with a separate cache per thread.
The use case is that some class needs to maintain a unique list of items, uses a cache for this,
and wants the list to be kept separate for each thread - even if the instance of the cache and/or client class is
the same.
Declaration
public bool ContainsKey(Item item)
Parameters
Type |
Name |
Description |
Item |
item |
|
Returns
Extension Methods