Class MemoryCache
Simple in-memory cache; used for development until enterprise caching (memcached, AppFrabric, etc) can be used
public class MemoryCache : ICache, IDisposable
- Inheritance
-
MemoryCache
- Implements
- Inherited Members
- Extension Methods
Properties
this[string]
public object this[string key] { get; }
Parameters
key
string
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
public void Dispose(bool isDisposing)
Parameters
isDisposing
bool
~MemoryCache()
protected ~MemoryCache()
Flush()
public void Flush()
Get(string)
public object Get(string key)
Parameters
key
string
Returns
Get<T>(string)
public T Get<T>(string key)
Parameters
key
string
Returns
- T
Type Parameters
T
Get<T>(string, T)
public T Get<T>(string key, T defaultValue)
Parameters
key
stringdefaultValue
T
Returns
- T
Type Parameters
T
HasKey(string)
public bool HasKey(string key)
Parameters
key
string
Returns
Remove(string)
public void Remove(string key)
Parameters
key
string
Store(string, object)
public void Store(string key, object data)