/// <summary> /// /// </summary> /// <param name="key"></param> /// <returns></returns> public static object GetHQ(string key) { object obj = NewsClientGB.Get(key); if (obj == null) { foreach (var c in memcacheList) { var client = GetClientGBByName(c); obj = client.Get(key); if (obj != null) { break; } } } return(obj); }
public static object[] GetHQ(string[] keys) { object[] objs = NewsClientGB.GetMultipleArray(keys); for (int i = 0; i < objs.Length; i++) { if (objs[i] == null) { objs[i] = NewsClientGB.Get(keys[i]); if (objs[i] == null) { foreach (var c in memcacheList) { var client = GetClientGBByName(c); objs[i] = client.Get(keys[i]); if (objs[i] != null) { break; } } } } } return(objs); }