Increment method stores incorrect value

Jul 14, 2010 at 1:40 PM
Edited Jul 14, 2010 at 1:44 PM
Hi, The increment method seems to be storing an incorrect value in the cache. To isolate the problem I've added the following test to the CacheProviderTest in the MemcachedProviders source code: [NUnit.Framework.Test] public void Increment_Test() { DistCache.Add("testKey", 0); Assert.AreEqual(1, DistCache.Increment("testKey", 1)); Assert.AreEqual(1, DistCache.Get("testKey")); } The first assert passes but the second one fails. I don't think the problem is test configuration because the Add_String_Positive_Test test passes. I did find in the memcache documentation a note that said the get method will fail after calling increment on a compressed value (, but I doubt this value is stored compressed (I didn't find any compression flags in the MemcachedProviders source code). I would love it if someone could run this test in an environment where Increment is known to work correctly. Best regards, Jennifer