小弟在asp.net项目中用到memcached,现在客户端处理碰到些问题。
memcached客户端使用外部配置文件,片段如下:
<memcachedclient>
<instanceslist>
<instance name="memcacheinstance" ...>
<server ip="192.168.89.1:11211" ... />
<server ip="192.168.89.2:11211" ... />
</instance>
...
</instanceslist>
</memcachedclient>客户端SockIOPool初始化: ...//读取外部配置文件获取客户端实例及Serverlist,过程略。
instance= "memcacheinstance";
serverList={"192.168.89.1:11211","192.168.89.2:11211"};
SockIOPool pool = SockIOPool.GetInstance(instance);
pool.SetServers(serverList);
...//SockIOPool初始值的设定(略)
pool.Initialize();
现要在配置中“memcacheinstance”实例节点下添加一个“server"节点:<server ip="192.168.89.3:11211" />
客户端怎样处理能够将配置文件中添加的server添加到SockIOPool中而不影响其它server(不能重新初始化另一个SockIOPool)?另外,有什么好的方法可以让程序自动检测到配置文件的变动?
memcached客户端使用外部配置文件,片段如下:
<memcachedclient>
<instanceslist>
<instance name="memcacheinstance" ...>
<server ip="192.168.89.1:11211" ... />
<server ip="192.168.89.2:11211" ... />
</instance>
...
</instanceslist>
</memcachedclient>客户端SockIOPool初始化: ...//读取外部配置文件获取客户端实例及Serverlist,过程略。
instance= "memcacheinstance";
serverList={"192.168.89.1:11211","192.168.89.2:11211"};
SockIOPool pool = SockIOPool.GetInstance(instance);
pool.SetServers(serverList);
...//SockIOPool初始值的设定(略)
pool.Initialize();
现要在配置中“memcacheinstance”实例节点下添加一个“server"节点:<server ip="192.168.89.3:11211" />
客户端怎样处理能够将配置文件中添加的server添加到SockIOPool中而不影响其它server(不能重新初始化另一个SockIOPool)?另外,有什么好的方法可以让程序自动检测到配置文件的变动?
解决方案 »
- 调用 7Z解压文件出现错误
- 如何设置和获取文件的路径
- Form1 这个是类还是对象
- 我在安装VS 2005时,发现有sql 2005 express 的选项,但装完后sql 2005不能用,这是怎会事啊?
- 关于一个com组件的时间注册,能帮助式一下吗?
- 关于用GRIDVIEW实现审核功能遇到的简单问题····大家看看我这里哪错了吗?
- 科学技术法
- .net mvc 3 分页,显示数据序号自增????
- 急!!!asp.net + c# 怎么实现产品的无限级分类?????????????????????????
- 多个TCPClient如何区分?? 急救
- 关于c#中图片编辑问题
- 请类要怎么设计才能在调用时候显示如下图的注释
数据比较多,所以没用System.Web.Caching.Cache.