小弟在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)?另外,有什么好的方法可以让程序自动检测到配置文件的变动?

解决方案 »

  1.   

    Memcached
      

  2.   

    不要使用这种东西。如果基于服务器的缓存使用,不如明明白白地使用一个内存数据库,而不是这类骗人的东西。在不是这类东西时,各个服务器可以自己使用 System.Web.Caching.Cache 来管理缓存数据,只是在  CacheDependency 的设计上才需要保持各服务器一致。
      

  3.   

    【而不是这类骗人的东西】太极端了,哈哈。某些场合还是蛮有用的。
    数据比较多,所以没用System.Web.Caching.Cache.