MemoryCacheTGetOrAdd(String, Double, FuncT, CacheEntryRemovedCallback) Method
Gets or adds a value, based on result of valueFactory, to the memory cache.
Namespace: Gemstone.CachingAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.171 -- Release Build+4f4d518944b843c059d40b523747cd410a7c216d
Gemstone.Caching.MemoryCache.GetOrAdd = function(cacheName, expirationTime, valueFactory, removedCallBack);
- cacheName String
- Name to use as cache key -- this should be unique per T.
- expirationTime Double
- Expiration time, in minutes, for cached value.
- valueFactory FuncT
- Function to generate value to add to cache -- only called if value is not already cached.
- removedCallBack CacheEntryRemovedCallback (Optional)
- Optional function to call when cache entry is removed.
T
Value from cache if already cached; otherwise, new value generated by
valueFactory.