Table of Contents

Class MemoryCache<T>

Namespace
Shift.Common
Assembly
Shift.Common.dll

This is a generic cache based on key/value pairs where key is a string. You can add any item to this cache as long as the key is unique, so treat keys like namespaces and apply consistent naming conventions throughout your application. Every cache entry has its own timeout. This class is thread safe and will delete expired entries on its own using System.Threading.Timers (which run on ThreadPool threads).

public class MemoryCache<T> : MemoryCache<string, T>, IDisposable, IMemoryCache<string, T>

Type Parameters

T
Inheritance
MemoryCache<T>
Implements
Inherited Members
Extension Methods

Constructors

MemoryCache()

public MemoryCache()