Beispiel #1
0
 public static void ClearSingleton()
 {
     CacheData.ClearKey(typeof(T).Name);
 }
Beispiel #2
0
        public static void Set(string id, T obj, int decaySec = 60 *CacheData.kSecond)
        {
            string cacheKey = MakeKey(id);

            CacheData.Set(cacheKey, obj, decaySec);
        }
Beispiel #3
0
 public static void SetSingleton(T obj, int decaySec = 60 *CacheData.kSecond)
 {
     CacheData.Set(typeof(T).Name, obj, decaySec);
 }
Beispiel #4
0
 public static T GetSingleton()
 {
     // Get singleton. Instance()
     return((T)CacheData.Get(typeof(T).Name));
 }