示例#1
0
        public static T Get <T>(CacheKey key)
        {
            object obj = ProductCache.Get(key.ToString());

            if (obj != null)
            {
                return((T)obj);
            }
            else
            {
                return(default(T));
            }
        }
示例#2
0
 public static void Remove(CacheKey key)
 {
     ProductCache.Remove(key.ToString());
 }
示例#3
0
 public static void Add(CacheKey key, object obj)
 {
     ProductCache.Add(key.ToString(), obj);
 }