MemoryCacheT Class

Represents a generic sliding memory cache for a specific type T.

Definition

Namespace: Gemstone.Caching
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.167 -- Release Build+1e132a4d484f1823d39b71639f55ad9da4974e99
public static class MemoryCache<T>
Inheritance
Object    MemoryCacheT

Type Parameters

T
Type of value to cache.

Remarks

Each type T should be unique unless cache can be safely shared.

Methods

GetOrAdd(String, FuncT, CacheEntryRemovedCallback) Gets or adds a value, based on result of valueFactory, to the memory cache. Cache defaults to a 1-minute expiration.
GetOrAdd(String, Double, FuncT, CacheEntryRemovedCallback) Gets or adds a value, based on result of valueFactory, to the memory cache.
KeepAlive Keeps a cache entry alive by resetting its expiration time.
Remove Removes a value from the memory cache.
TryGet Try to get a value from the memory cache.

See Also