Table of Contents

Class MemoryCache

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

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

object

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

object

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 string
defaultValue T

Returns

T

Type Parameters

T

HasKey(string)

public bool HasKey(string key)

Parameters

key string

Returns

bool

Remove(string)

public void Remove(string key)

Parameters

key string

Store(string, object)

public void Store(string key, object data)

Parameters

key string
data object