> Hello, > > Ok, I already saw that the counters can have very large values by > looking at the signature :) > memcached_return_t memcached_increment(memcached_st *ptr, > const char *key, size_t > key_length, > uint32_t offset, > uint64_t *value); > > My question was : are there any logical considerations in choosing > uint64_t for the counter value, instead of int64_t ? In my current > application, negative counters would be very handy, but unfortunately > memcached does not allow this. :(
You're not talking about stats counters, you're talking about incr/decr on an item? That's a legacy issue, and not something we can really change anyway. You can wrap those calls in your application to turn it into a signed value without too much effort, I suppose? A "value" of 0 in uint64_t would be the signed -9223372036854775808 or whatever it is. -Dormando
