using KC.Cache.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;
namespace KC.Cache
{
public class CacheFactory
{
///
/// 获取缓存对象
///
///
public static ICache GetCache(CacheType cacheType = CacheType.WebCacne)
{
switch (cacheType)
{
case CacheType.WebCacne:
return new KC.Cache.WebCache.WebCache();
case CacheType.RedisCache:
return new RedisCache();
};
return RedisCache.GetRedisCache();
}
}
public enum CacheType
{
WebCacne = 1,
RedisCache = 2
}
}