コード例 #1
0
 public static int CalcSize(object objToCache)
 {
     return(Compress.CompressGZip(ConvertHelper.ObjectToByteArray(objToCache)).Length);
 }
コード例 #2
0
 public static void Insert(string cachekey, object objToCache, int minutesToCache)
 {
     HttpContext.Current.Cache.Insert(cachekey, Compress.CompressGZip(ConvertHelper.ObjectToByteArray(objToCache)), null, DateTime.Now.AddMinutes(minutesToCache), System.Web.Caching.Cache.NoSlidingExpiration);
 }