2013-06-18 2 views
0

memcached 클라이언트 값을 가져올 수 없습니다.저장된 memcached 클라이언트 값을 가져올 수 없습니다.

이 값은 TEST의 값을 다시 검색하지 않습니다.이 코드에서 잘못된 점은 무엇입니까?

Console.Out.WriteLine ("START :");

   var cfg = new MemcachedClientConfiguration(); 

       cfg.AddServer("127.0.0.1", 11211); 
       cfg.Protocol = MemcachedProtocol.Binary; 
       //cfg.SocketPool.MinPoolSize = 10; 
       //cfg.SocketPool.MaxPoolSize = 50; 
       //TimeSpan ts = new TimeSpan(0, 10, 0); 
       //cfg.SocketPool.ConnectionTimeout=ts; 
       //cfg.SocketPool.DeadTimeout = ts; 

     //cfg.SocketPool 
     //var m = new MemcachedClient(cfg); 

       MemcachedClient client = new MemcachedClient(cfg); 

      client.Store(StoreMode.Set, "Test2", "Hello World"); 

      //Get a string 
      //var myVal = client.Get<string>("Test2"); 
      string str = client.Get("Test2") as string; 
      if (str != null) 
      { 
       Console.Out.WriteLine("Fetched item with key: mystring, value: " + str); 
      } 
+0

그것은 값을 설정하지 않습니다를 설치 한 것이 코드를 실행, 해결책을 발견 –

답변

관련 문제