using cas in ascii mode results in errors when exp is negative. Why use a
negative expiration? To implement a compare and delete using cas.
against a real memcached server, it throws the following exception:
net.rubyeye.xmemcached.exception.UnknownCommandException: Response error,error
message:Unknow command CAS
against jmemcache-daemon, it results in a timeout:
java.util.concurrent.TimeoutException: Timed out(2000) waiting for operation
behaves as expected in binary mode; however, later versions of memcached have
changed the their behavior with respect to negative expiration values. prior
versions treated a negative expiration in a set / cas as a delete. newest
version sets it with an unknown expiration (possibily infinite).
workaround for xmemcached (and newer releases of memcached) is to use an
expiration of 2592001 (30 days + 1 second).
Original issue reported on code.google.com by jonat...@gmail.com on 13 Jul 2011 at 9:41
Original issue reported on code.google.com by
jonat...@gmail.com
on 13 Jul 2011 at 9:41