{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/927f8bfd78f3bede2e55e4dc00793966?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"927f8bfd78f3bede2e55e4dc00793966","url":"https://api.github.com/users/andy13c72back","login":"andy13c72back","id":962598},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-02T03:56:40Z","closed_at":null,"comments":9,"url":"https://api.github.com/repos/enyim/EnyimMemcached/issues/75","body":"I'm using Enyim.caching as my custom session state provider, it was fine before upgrading to Enyim.Caching 2.11. But I've found that there could be a serious bug after upgrade.\r\n\r\nvar ts = TimeSpan.FromMinutes(45);\r\nclient.Store(Enyim.Caching.Memcached.StoreMode.Set, \"id\", \"testObj\", ts); //this returns true\r\n\r\nvar obj = client.Get(\"id\"); //this returns null\r\n\r\nIf you change the code to:\r\nvar ts = DateTime.Now.AddDays(1);\r\nclient.Store(Enyim.Caching.Memcached.StoreMode.Set, \"id\", \"testObj\", ts); //this returns true\r\n\r\nvar obj = client.Get(\"id\"); //this returns \"testObj\"\r\n\r\nIt seems it's a bug that take only the date into account for the timeout, ignoring the time of a DateTime. Please confirm it's a bug.\r\n\r\nMany Thx","html_url":"https://github.com/enyim/EnyimMemcached/issues/75","number":75,"title":"Time.Span.FromMinutes causes stored object time out immediately?","id":1355336,"created_at":"2011-08-06T05:50:48Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/5b1a48a9c643c4a14b5595903bbfb752?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5b1a48a9c643c4a14b5595903bbfb752","url":"https://api.github.com/users/kardiss","login":"kardiss","id":889601},"updated_at":"2011-11-02T03:56:40Z","url":"https://api.github.com/repos/enyim/EnyimMemcached/issues/comments/2599460","body":"Okay. Here's something interesting I've found. It's stated that Timeout should never be set to greater than 30 days. I saw that the recent patch addressed an issue with TimeInterval > 30. This might explain why it's failing now.\r\n\r\nBy the way, I am using x64 Memcached 1.4.2 found here (http://www.urielkatz.com/archive/detail/memcached-64-bit-windows/)\r\n\r\n----------------------------------------------------------\r\n\r\nhttp://lzone.de/articles/memcached.htm\r\n\r\nNever Set a Timeout > 30 Days!\r\n\r\nWhile this has nothing to do with the telnet access this is a problem you might run into. If you try to \"set\" or \"add\" a key with a timeout bigger than the allowed maximum you might not get what you expect because memcached then treats the value as a Unix timestamp. Also if the timestamp is in the past it will do nothing at all. Your command will silently fail.\r\n\r\nSo if you want to use the maximum lifetime specify 2592000. Example:\r\n\r\nset my_key 0 2592000 1 1\r\n","id":2599460,"created_at":"2011-11-02T03:56:40Z"}}