Our project is running on a 2.2.0 Couchbase server, and we are facing a really interesting problem. If we want to store a document in a memcached bucket with expiration date, 59 seconds is working OK, 60 seconds will never expire, 61 seconds will expire after 1 second. We tried with 1.3.6 client version.
I wrote a test application for this:
var client = new CouchbaseClient();client.ExecuteRemove(“test1234”);
client.ExecuteRemove(“test12345”);
client.ExecuteRemove(“test123456”);
client.ExecuteStore(StoreMode.Set, “test1234”, “blabababla”, new TimeSpan(0, 0, 59));
client.ExecuteStore(StoreMode.Set, “test12345”, “blababablaa”, new TimeSpan(0, 0, 60));
client.ExecuteStore(StoreMode.Set, “test123456”, “blababablaaa”, new TimeSpan(0, 0, 61));
Console.WriteLine(“Reading…”);
for (int i = 0; i < 100; i++)
{
Console.WriteLine(string.Format(“read {0}: {1}”, i, client.ExecuteGet(“test1234”).Value));
Console.WriteLine(string.Format(“read {0}: {1}”, i, client.ExecuteGet(“test12345”).Value));
Console.WriteLine(string.Format(“read {0}: {1}”, i, client.ExecuteGet(“test123456”).Value));
Thread.Sleep(new TimeSpan(0, 0, 1));
}
Console.Read();
Can you help us to solve this problem?