示例#1
0
 /// <summary>
 /// Gets a instance of this class.
 /// </summary>
 /// <returns></returns>
 public static GenericCacheManager GetInstance()
 {
     if (_genericCacheManager == null)
     {
         lock (_thisLock)
         {
             if (_genericCacheManager == null)
             {
                 _genericCacheManager = new GenericCacheManager();
             }
         }
     }
     return(_genericCacheManager);
 }
示例#2
0
 /// <summary>
 /// Gets from cache object.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <returns></returns>
 private static object GetFromCache(string key)
 {
     return(GenericCacheManager.GetInstance().CacheProvider[key]);
 }