Пример #1
0
 /// <summary>
 /// 缓存压缩
 /// </summary>
 /// <example>
 /// <code>
 /// Cache2.Compress&lt;IList&lt;CachedItem>>("test", new List&lt;CachedItem>() { new CachedItem() { CacheKey = "1", CacheType = "string" }, new CachedItem() { CacheKey = "1", CacheType = "string" } });
 /// </code>
 /// </example>
 /// <typeparam name="T">类型</typeparam>
 /// <param name="key">键</param>
 /// <param name="obj">值</param>
 public static void Compress <T>(string key, T obj) where T : class
 {
     _cache.Compress <T>(key, obj);
 }