国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

.net/c# memcached緩存獲取所有緩存鍵的方法步驟

2024-07-10 12:44:18
字體:
來源:轉載
供稿:網友

使用組件

memcached 1.2.6

.net 類庫 memcacheddotnet_clientlib-1.1.5

1.增加memcacheddotnet_clientlib-1.1.5代碼

下載好組件后,用vs打開.net類庫memcacheddotnet_clientlib-1.1.5,打開MemCachedClient.cs,增加如下方法:

代碼如下:
public Hashtable Stats(ArrayList servers, string command)
        {

            // get SockIOPool instance
            SockIOPool pool = SockIOPool.GetInstance(_poolName);

            // return false if unable to get SockIO obj
            if (pool == null)
            {
                //if(log.IsErrorEnabled)
                //{
                //    log.Error(GetLocalizedString("unable to get socket pool"));
                //}
                return null;
            }

            // get all servers and iterate over them
            if (servers == null)
                servers = pool.Servers;

            // if no servers, then return early
            if (servers == null || servers.Count <= 0)
            {
                //if(log.IsErrorEnabled)
                //{
                //    log.Error(GetLocalizedString("stats no servers"));
                //}
                return null;
            }

            // array of stats Hashtables

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 镇宁| 北海市| 延吉市| 全州县| 青铜峡市| 工布江达县| 昭觉县| 历史| 巴塘县| 巫山县| 通化市| 青岛市| 浦县| 阿拉善右旗| 防城港市| 恩施市| 朔州市| 陆良县| 雷波县| 扎鲁特旗| 怀集县| 南皮县| 石台县| 定安县| 长白| 浦东新区| 田阳县| 洱源县| 山丹县| 温宿县| 巧家县| 大竹县| 贺兰县| 新和县| 仪陇县| 嘉定区| 临泉县| 乐山市| 瓮安县| 桦甸市| 司法|