Ejemplo n.º 1
0
 public static MemcacheBasicA GetInstance()
 {
     if (instance == null)
     {
         instance = new MemcacheBasicA();
     }
     if (mc == null)
     {
         InitMemcacheClient();
     }
     return(instance);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取基础数据缓存池
        /// </summary>
        /// <param name="systemID">系统ID</param>
        /// <returns></returns>
        public static IMemcacheAgent GetBasicMemcachePool(int systemID)
        {
            IMemcacheAgent result = null;

            switch (systemID % 2)
            {
            case 0:
                result = MemcacheBasicA.GetInstance();
                break;

            case 1:
                result = MemcacheBasicB.GetInstance();
                break;
            }
            return(result);
        }