Memcache INCR/DECR API

Patrick-Emmanuel Boulanger-Nadeau pbnadeau at gmail.com
Wed Dec 8 14:36:13 PST 2004


I've been working with memcache for a while, and since we where using
mostly the incr & decr function, we needed to make sure the key
existed or answer accordingly when the key was missing. Since most of
the incr were done on non existing key, it was amounting to many add
request (& following inc on failed add since there was many
competitive add on a failed incr etc..) and so adding a parameter to
the incr function, that when present & equal to 1 was allowing the
creation of the key directly in memcache, speeded up the process a
lot.

I was wondering if it would be a good addition to the memcache API,
since it could be helpfull to other people as well.

Feel free to comment or request more informations, 
Thank you,
Patrick-Emmanuel Boulanger-Nadeau


More information about the memcached mailing list