Table of Contents

Class FixedSizeMemoryCache<TKey, TValue>

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

A cache maintained in memory that stays fixed in size.

public class FixedSizeMemoryCache<TKey, TValue> : ICache<TKey, TValue>

Type Parameters

TKey
TValue
Inheritance
FixedSizeMemoryCache<TKey, TValue>
Implements
ICache<TKey, TValue>
Inherited Members
Extension Methods

Constructors

FixedSizeMemoryCache(int)

Initializes a new instance of the FixedSizeMemoryCache<TKey, TValue> class.

Properties

Count

Gets the number of elements in the cache .

IsFull

Gets a value indicating whether this cache is full.

this[TKey]

Gets or sets the value with the specified key. The method ContainsKey should always be called before getting the value of a key.

Methods

ContainsKey(TKey)

Determines whether this cache contains the specified key.

Remove(TKey)

Removes the element at the specified key from the cache.

RemoveOldest()

Removes the oldest item from the cache.