Example #1
0
        internal T Get <T>(string key, TimeSpan expiration, GetCacheObjectDelegate <T> getCacheObjectDelegate, CacheItemRemovedCallback cacheItemRemovedCallback)
        {
            T obj = Get <T>(key);

            if (obj == null)
            {
                obj = getCacheObjectDelegate();
                Set(key, obj, expiration, cacheItemRemovedCallback);
            }
            return(obj);
        }
Example #2
0
 public T Get <T>(string key, GetCacheObjectDelegate <T> getCacheObjectDelegate)
 {
     return(Get(key, DefaultTimeout, getCacheObjectDelegate, null));
 }
Example #3
0
 public T Get <T>(string key, TimeSpan expiration, GetCacheObjectDelegate <T> getCacheObjectDelegate)
 {
     return(Get(key, expiration, getCacheObjectDelegate, null));
 }