var config = new MemcachedClientConfiguration();
config.Protocol = MemcachedProtocol.Binary;
config.AddServer(server[0],int.Parse(server[1]));
var mc = new MemcachedClient(config);
var finish = mc.Store(StoreMode.Set, key, value,TimeSpan.FromSeconds((double)60000));
if(finish)
{
var obj=mc.Get(key);
Debug.Assert(obj==null,"obj is null.")
}
The result(obj) always returns null, why?
If expire is set to TimeSpan.MaxValue it is okay.
The code looks fine. I’ve run a test for this and it passes
Thus I’d suspect the configuration, here is the one I’ve used for comparison