OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
OpenSim.Framework.CnmMemoryCache< TKey, TValue > Class Template Reference

Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size. More...

Inheritance diagram for OpenSim.Framework.CnmMemoryCache< TKey, TValue >:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Framework.CnmMemoryCache< TKey, TValue >:
Collaboration graph
[legend]

Classes

interface  IGeneration
 Cache element generation interface More...
 

Public Member Functions

 CnmMemoryCache ()
 Initializes a new instance of the CnmMemoryCache{TKey,TValue} class. More...
 
 CnmMemoryCache (long maximalSize)
 Initializes a new instance of the CnmMemoryCache{TKey,TValue} class. More...
 
 CnmMemoryCache (long maximalSize, int maximalCount)
 Initializes a new instance of the CnmMemoryCache{TKey,TValue} class. More...
 
 CnmMemoryCache (long maximalSize, int maximalCount, TimeSpan expirationTime)
 Initializes a new instance of the CnmMemoryCache{TKey,TValue} class. More...
 
 CnmMemoryCache (long maximalSize, int maximalCount, TimeSpan expirationTime, IEqualityComparer< TKey > comparer)
 Initializes a new instance of the CnmMemoryCache{TKey,TValue} class. More...
 
void Clear ()
 Removes all elements from the ICnmCache{TKey,TValue}. More...
 
IEnumerator< KeyValuePair
< TKey, TValue > > 
GetEnumerator ()
 Returns an enumerator that iterates through the elements stored to CnmMemoryCache{TKey,TValue}. More...
 
void PurgeExpired ()
 Purge expired elements from the ICnmCache{TKey,TValue}. More...
 
void Remove (TKey key)
 Removes element associated with key from the ICnmCache{TKey,TValue}. More...
 
void RemoveRange (IEnumerable< TKey > keys)
 Removes elements that are associated with one of keys from the ICnmCache{TKey,TValue}. More...
 
bool Set (TKey key, TValue value, long size)
 Add or replace an element with the provided key , value and size to ICnmCache{TKey,TValue}. More...
 
bool TryGetValue (TKey key, out TValue value)
 Gets the value associated with the specified key . More...
 

Public Attributes

const int DefaultMaxCount = 4096
 Default maximal count. More...
 
const long DefaultMaxSize = 134217728
 Default maximal size. More...
 
readonly IEqualityComparer< TKey > Comparer
 Comparer used to compare element keys. More...
 

Static Public Attributes

static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0)
 Default expiration time. More...
 
static readonly TimeSpan MinExpirationTime = TimeSpan.FromSeconds(10.0)
 Minimal allowed expiration time. More...
 

Protected Member Functions

virtual void AddToNewGeneration (int bucketIndex, TKey key, TValue value, long size)
 Add element to new generation. More...
 
virtual int GetBucketIndex (TKey key)
 
virtual void PurgeGeneration (IGeneration generation)
 Purge generation from the cache. More...
 

Properties

int Count [get]
 Gets current count of elements stored to ICnmCache{TKey,TValue}. More...
 
TimeSpan ExpirationTime [get, set]
 Gets or sets elements expiration time. More...
 
bool IsCountLimited [get]
 Gets a value indicating whether ICnmCache{TKey,TValue} is limiting count of elements. More...
 
bool IsSizeLimited [get]
 Gets a value indicating whether ICnmCache{TKey,TValue} is limiting size of elements. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether or not access to the ICnmCache{TKey,TValue} is synchronized (thread safe). More...
 
bool IsTimeLimited [get]
 Gets a value indicating whether elements stored to ICnmCache{TKey,TValue} have limited inactivity time. More...
 
int MaxCount [get, set]
 Gets or sets maximal allowed count of elements that can be stored to ICnmCache{TKey,TValue}. More...
 
long MaxElementSize [get, set]
 
long MaxSize [get, set]
 Gets or sets maximal allowed total size for elements stored to ICnmCache{TKey,TValue}. More...
 
long Size [get]
 Gets total size of elements stored to ICnmCache{TKey,TValue}. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the ICnmCache{TKey,TValue}. More...
 
- Properties inherited from OpenSim.Framework.ICnmCache< TKey, TValue >
int Count [get]
 Gets current count of elements stored to ICnmCache{TKey,TValue}. More...
 
TimeSpan ExpirationTime [get, set]
 Gets or sets elements expiration time. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether or not access to the ICnmCache{TKey,TValue} is synchronized (thread safe). More...
 
bool IsCountLimited [get]
 Gets a value indicating whether ICnmCache{TKey,TValue} is limiting count of elements. More...
 
bool IsSizeLimited [get]
 Gets a value indicating whether ICnmCache{TKey,TValue} is limiting size of elements. More...
 
bool IsTimeLimited [get]
 Gets a value indicating whether elements stored to ICnmCache{TKey,TValue} have limited inactivity time. More...
 
int MaxCount [get, set]
 Gets or sets maximal allowed count of elements that can be stored to ICnmCache{TKey,TValue}. More...
 
long MaxElementSize [get]
 
long MaxSize [get, set]
 Gets or sets maximal allowed total size for elements stored to ICnmCache{TKey,TValue}. More...
 
long Size [get]
 Gets total size of elements stored to ICnmCache{TKey,TValue}. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the ICnmCache{TKey,TValue}. More...
 

Detailed Description

Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size.

Template Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the dictionary.

Cenome memory cache stores elements to hash table generations. When new element is being added to cache, and new size would exceed maximal allowed size or maximal amount of allowed element count, then elements in oldest generation are deleted. Last access time is also tracked in generation level - thus it is possible that some elements are staying in cache far beyond their expiration time. If elements in older generations are accessed through TryGetValue method, they are moved to newest generation.

Definition at line 52 of file CnmMemoryCache.cs.

Constructor & Destructor Documentation

OpenSim.Framework.CnmMemoryCache< TKey, TValue >.CnmMemoryCache ( )
inline

Initializes a new instance of the CnmMemoryCache{TKey,TValue} class.

Definition at line 173 of file CnmMemoryCache.cs.

OpenSim.Framework.CnmMemoryCache< TKey, TValue >.CnmMemoryCache ( long  maximalSize)
inline

Initializes a new instance of the CnmMemoryCache{TKey,TValue} class.

Parameters
maximalSizeMaximal cache size.

Definition at line 184 of file CnmMemoryCache.cs.

OpenSim.Framework.CnmMemoryCache< TKey, TValue >.CnmMemoryCache ( long  maximalSize,
int  maximalCount 
)
inline

Initializes a new instance of the CnmMemoryCache{TKey,TValue} class.

Parameters
maximalSizeMaximal cache size.
maximalCountMaximal element count.

Definition at line 198 of file CnmMemoryCache.cs.

OpenSim.Framework.CnmMemoryCache< TKey, TValue >.CnmMemoryCache ( long  maximalSize,
int  maximalCount,
TimeSpan  expirationTime 
)
inline

Initializes a new instance of the CnmMemoryCache{TKey,TValue} class.

Parameters
maximalSizeMaximal cache size.
maximalCountMaximal element count.
expirationTimeElements expiration time.

Definition at line 215 of file CnmMemoryCache.cs.

OpenSim.Framework.CnmMemoryCache< TKey, TValue >.CnmMemoryCache ( long  maximalSize,
int  maximalCount,
TimeSpan  expirationTime,
IEqualityComparer< TKey >  comparer 
)
inline

Initializes a new instance of the CnmMemoryCache{TKey,TValue} class.

Parameters
maximalSizeMaximal cache size.
maximalCountMaximal element count.
expirationTimeElements expiration time.
comparerComparer used for comparing elements.
Exceptions
ArgumentNullExceptioncompareris reference.

Definition at line 238 of file CnmMemoryCache.cs.

Member Function Documentation

virtual void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.AddToNewGeneration ( int  bucketIndex,
TKey  key,
TValue  value,
long  size 
)
inlineprotectedvirtual

Add element to new generation.

Parameters
bucketIndexThe bucket index.
keyThe element's key.
valueThe element's value.
sizeThe element's size.

Definition at line 278 of file CnmMemoryCache.cs.

void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Clear ( )
inline

Removes all elements from the ICnmCache{TKey,TValue}.

See Also
ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.Remove, ICnmCache{TKey,TValue}.RemoveRange, ICnmCache{TKey,TValue}.TryGetValue, ICnmCache{TKey,TValue}.PurgeExpired

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1604 of file CnmMemoryCache.cs.

virtual int OpenSim.Framework.CnmMemoryCache< TKey, TValue >.GetBucketIndex ( TKey  key)
inlineprotectedvirtual

Get keys bucket index.

Parameters
keyKey which bucket index is being retrieved.
Returns
Bucket index.

Method uses Comparer to calculate key hash code.

Bucket index is remainder when element key's hash value is divided by bucket count.

For example: key's hash is 72, bucket count is 5, element's bucket index is 72 % 5 = 2.

Definition at line 317 of file CnmMemoryCache.cs.

IEnumerator<KeyValuePair<TKey, TValue> > OpenSim.Framework.CnmMemoryCache< TKey, TValue >.GetEnumerator ( )
inline

Returns an enumerator that iterates through the elements stored to CnmMemoryCache{TKey,TValue}.

Returns
A IEnumerator{T} that can be used to iterate through the collection.

<filterpriority>1</filterpriority>

Definition at line 1619 of file CnmMemoryCache.cs.

void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.PurgeExpired ( )
inline

Purge expired elements from the ICnmCache{TKey,TValue}.

Element becomes expired when last access time to it has been longer time than ICnmCache{TKey,TValue}.ExpirationTime.

Depending on ICnmCache{TKey,TValue} implementation, some of expired elements may stay longer than ICnmCache{TKey,TValue}.ExpirationTime in the cache.

See Also
ICnmCache{TKey,TValue}.IsTimeLimited, ICnmCache{TKey,TValue}.ExpirationTime, ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.Remove, ICnmCache{TKey,TValue}.RemoveRange, ICnmCache{TKey,TValue}.TryGetValue, ICnmCache{TKey,TValue}.Clear

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1643 of file CnmMemoryCache.cs.

virtual void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.PurgeGeneration ( IGeneration  generation)
inlineprotectedvirtual

Purge generation from the cache.

Parameters
generationThe generation that is purged.

Definition at line 328 of file CnmMemoryCache.cs.

void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Remove ( TKey  key)
inline

Removes element associated with key from the ICnmCache{TKey,TValue}.

Parameters
keyThe key that is associated with element to remove from the ICnmCache{TKey,TValue}.
Exceptions
ArgumentNullExceptionkey is .
See Also
ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.RemoveRange, ICnmCache{TKey,TValue}.TryGetValue, ICnmCache{TKey,TValue}.Clear, ICnmCache{TKey,TValue}.PurgeExpired

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1685 of file CnmMemoryCache.cs.

void OpenSim.Framework.CnmMemoryCache< TKey, TValue >.RemoveRange ( IEnumerable< TKey >  keys)
inline

Removes elements that are associated with one of keys from the ICnmCache{TKey,TValue}.

Parameters
keysThe keys that are associated with elements to remove from the ICnmCache{TKey,TValue}.
Exceptions
ArgumentNullExceptionkeys is .
See Also
ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.Remove, ICnmCache{TKey,TValue}.TryGetValue, ICnmCache{TKey,TValue}.Clear, ICnmCache{TKey,TValue}.PurgeExpired

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1718 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Set ( TKey  key,
TValue  value,
long  size 
)
inline

Add or replace an element with the provided key , value and size to ICnmCache{TKey,TValue}.

Parameters
keyThe object used as the key of the element. Can't be reference.
valueThe object used as the value of the element to add or replace. is allowed.
sizeThe element's size. Normally bytes, but can be any suitable unit of measure.
Returns
if element has been added successfully to the ICnmCache{TKey,TValue}; otherwise .
Exceptions
ArgumentNullExceptionkey is .
ArgumentOutOfRangeExceptionThe element's size is less than 0.

If element's size is larger than ICnmCache{TKey,TValue}.MaxElementSize, then element is not added to the ICnmCache{TKey,TValue}, however - possible older element is removed from the ICnmCache{TKey,TValue}.

When adding an new element to ICnmCache{TKey,TValue} that is limiting total size of elements, ICnmCache{TKey,TValue}will remove less recently used elements until it can fit an new element.

When adding an new element to ICnmCache{TKey,TValue} that is limiting element count, ICnmCache{TKey,TValue}will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.Remove, ICnmCache{TKey,TValue}.RemoveRange, ICnmCache{TKey,TValue}.TryGetValue, ICnmCache{TKey,TValue}.Clear, ICnmCache{TKey,TValue}.PurgeExpired

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1782 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.TryGetValue ( TKey  key,
out TValue  value 
)
inline

Gets the value associated with the specified key .

Returns
if the ICnmCache{TKey,TValue} contains an element with the specified key; otherwise, .
Parameters
keyThe key whose value to get.
valueWhen this method returns, the value associated with the specified key , if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Exceptions
ArgumentNullExceptionkey is .
See Also
ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.Remove, ICnmCache{TKey,TValue}.RemoveRange, ICnmCache{TKey,TValue}.Clear, ICnmCache{TKey,TValue}.PurgeExpired

Implements OpenSim.Framework.ICnmCache< TKey, TValue >.

Definition at line 1831 of file CnmMemoryCache.cs.

Member Data Documentation

readonly IEqualityComparer<TKey> OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Comparer

Comparer used to compare element keys.

Comparer is initialized by constructor.

See Also
CnmMemoryCache{TKey,TValue}

Definition at line 103 of file CnmMemoryCache.cs.

readonly TimeSpan OpenSim.Framework.CnmMemoryCache< TKey, TValue >.DefaultExpirationTime = TimeSpan.FromMinutes(30.0)
static

Default expiration time.

30 minutes.

Definition at line 84 of file CnmMemoryCache.cs.

const int OpenSim.Framework.CnmMemoryCache< TKey, TValue >.DefaultMaxCount = 4096

Default maximal count.

See Also
MaxCount

Definition at line 58 of file CnmMemoryCache.cs.

const long OpenSim.Framework.CnmMemoryCache< TKey, TValue >.DefaultMaxSize = 134217728

Default maximal size.

128MB = 128 * 1024^2 = 134 217 728 bytes.

See Also
MaxSize

Definition at line 69 of file CnmMemoryCache.cs.

readonly TimeSpan OpenSim.Framework.CnmMemoryCache< TKey, TValue >.MinExpirationTime = TimeSpan.FromSeconds(10.0)
static

Minimal allowed expiration time.

5 minutes.

Definition at line 94 of file CnmMemoryCache.cs.

Property Documentation

int OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Count
get

Gets current count of elements stored to ICnmCache{TKey,TValue}.

When adding an new element to ICnmCache{TKey,TValue} that is limiting element count, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.MaxCount, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.IsTimeLimited

Definition at line 1315 of file CnmMemoryCache.cs.

TimeSpan OpenSim.Framework.CnmMemoryCache< TKey, TValue >.ExpirationTime
getset

Gets or sets elements expiration time.

Elements expiration time.

When element has been stored in ICnmCache{TKey,TValue} longer than ICnmCache{TKey,TValue}.ExpirationTime and it is not accessed through ICnmCache{TKey,TValue}.TryGetValue method or element's value is not replaced by ICnmCache{TKey,TValue}.Set method, then it is automatically removed from the ICnmCache{TKey,TValue}.

It is possible that ICnmCache{TKey,TValue} implementation removes element before it's expiration time, because total size or count of elements stored to cache is larger than ICnmCache{TKey,TValue}.MaxSize or ICnmCache{TKey,TValue}.MaxCount.

It is also possible that element stays in cache longer than ICnmCache{TKey,TValue}.ExpirationTime.

Calling ICnmCache{TKey,TValue}.PurgeExpired try to remove all elements that are expired.

To disable time limit in cache, set ICnmCache{TKey,TValue}.ExpirationTime to DateTime.MaxValue.

See Also
ICnmCache{TKey,TValue}.IsTimeLimited, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.PurgeExpired, ICnmCache{TKey,TValue}.Count, ICnmCache{TKey,TValue}.MaxCount, ICnmCache{TKey,TValue}.MaxSize, ICnmCache{TKey,TValue}.Size

Definition at line 1355 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.IsCountLimited
get

Gets a value indicating whether ICnmCache{TKey,TValue} is limiting count of elements.

if the ICnmCache{TKey,TValue} count of elements is limited; otherwise, .

When adding an new element to ICnmCache{TKey,TValue} that is limiting element count, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.Count, ICnmCache{TKey,TValue}.MaxCount, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.IsTimeLimited

Definition at line 1392 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.IsSizeLimited
get

Gets a value indicating whether ICnmCache{TKey,TValue} is limiting size of elements.

if the ICnmCache{TKey,TValue} total size of elements is limited; otherwise, .

When adding an new element to ICnmCache{TKey,TValue} that is limiting total size of elements, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.MaxElementSize, ICnmCache{TKey,TValue}.Size, ICnmCache{TKey,TValue}.MaxSize, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.IsTimeLimited

Definition at line 1415 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.IsSynchronized
get

Gets a value indicating whether or not access to the ICnmCache{TKey,TValue} is synchronized (thread safe).

if access to the ICnmCache{TKey,TValue} is synchronized (thread safe); otherwise, .

To get synchronized (thread safe) access to ICnmCache{TKey,TValue} object, use CnmSynchronizedCache{TKey,TValue}.Synchronized in CnmSynchronizedCache{TKey,TValue} class to retrieve synchronized wrapper for ICnmCache{TKey,TValue} object.

See Also
ICnmCache{TKey,TValue}.SyncRoot, CnmSynchronizedCache{TKey,TValue}

Definition at line 1436 of file CnmMemoryCache.cs.

bool OpenSim.Framework.CnmMemoryCache< TKey, TValue >.IsTimeLimited
get

Gets a value indicating whether elements stored to ICnmCache{TKey,TValue} have limited inactivity time.

if the ICnmCache{TKey,TValue} has a fixed total size of elements; otherwise, .

If ICnmCache{TKey,TValue} have limited inactivity time and element is not accessed through ICnmCache{TKey,TValue}.Set or ICnmCache{TKey,TValue}.TryGetValue methods in ICnmCache{TKey,TValue}.ExpirationTime , then element is automatically removed from the cache. Depending on implementation of the ICnmCache{TKey,TValue}, some of the elements may stay longer in cache.

See Also
ICnmCache{TKey,TValue}.ExpirationTime, ICnmCache{TKey,TValue}.PurgeExpired, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.IsSizeLimited

Definition at line 1458 of file CnmMemoryCache.cs.

int OpenSim.Framework.CnmMemoryCache< TKey, TValue >.MaxCount
getset

Gets or sets maximal allowed count of elements that can be stored to ICnmCache{TKey,TValue}.

int.MaxValue, if ICnmCache{TKey,TValue} is not limited by count of elements; otherwise maximal allowed count of elements.

When adding an new element to ICnmCache{TKey,TValue} that is limiting element count, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

Definition at line 1476 of file CnmMemoryCache.cs.

long OpenSim.Framework.CnmMemoryCache< TKey, TValue >.MaxElementSize
getset

Gets maximal allowed element size.

Maximal allowed element size.

If element's size is larger than ICnmCache{TKey,TValue}.MaxElementSize, then element is not added to the ICnmCache{TKey,TValue}.

See Also
ICnmCache{TKey,TValue}.Set, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.Size, ICnmCache{TKey,TValue}.MaxSize

Definition at line 1508 of file CnmMemoryCache.cs.

long OpenSim.Framework.CnmMemoryCache< TKey, TValue >.MaxSize
getset

Gets or sets maximal allowed total size for elements stored to ICnmCache{TKey,TValue}.

Maximal allowed total size for elements stored to ICnmCache{TKey,TValue}.

Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.

When adding an new element to ICnmCache{TKey,TValue} that is limiting total size of elements, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.MaxElementSize, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.Size

Definition at line 1533 of file CnmMemoryCache.cs.

long OpenSim.Framework.CnmMemoryCache< TKey, TValue >.Size
get

Gets total size of elements stored to ICnmCache{TKey,TValue}.

Total size of elements stored to ICnmCache{TKey,TValue}.

Normally bytes, but can be any suitable unit of measure.

Element's size is given when element is added or replaced by ICnmCache{TKey,TValue}.Set method.

When adding an new element to ICnmCache{TKey,TValue} that is limiting total size of elements, ICnmCache{TKey,TValue} will remove less recently used elements until it can fit an new element.

See Also
ICnmCache{TKey,TValue}.MaxElementSize, ICnmCache{TKey,TValue}.IsSizeLimited, ICnmCache{TKey,TValue}.MaxSize, ICnmCache{TKey,TValue}.IsCountLimited, ICnmCache{TKey,TValue}.ExpirationTime

Definition at line 1572 of file CnmMemoryCache.cs.

object OpenSim.Framework.CnmMemoryCache< TKey, TValue >.SyncRoot
get

Gets an object that can be used to synchronize access to the ICnmCache{TKey,TValue}.

An object that can be used to synchronize access to the ICnmCache{TKey,TValue}.

To get synchronized (thread safe) access to ICnmCache{TKey,TValue}, use CnmSynchronizedCache{TKey,TValue} method CnmSynchronizedCache{TKey,TValue}.Synchronized to retrieve synchronized wrapper interface to ICnmCache{TKey,TValue}.

See Also
ICnmCache{TKey,TValue}.IsSynchronized, CnmSynchronizedCache{TKey,TValue}

Definition at line 1592 of file CnmMemoryCache.cs.


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