Tim Bunce > Memcached-libmemcached-0.2101 > memcached_decrement

Download:
Memcached-libmemcached-0.2101.tar.gz

Annotate this POD

CPAN RT

New  1
Open  1
View Bugs
Report a bug
Source   Latest Release: Memcached-libmemcached-0.3102

NAME ^

memcached_increment, memcached_decrement

LIBRARY ^

C Client Library for memcached (libmemcached, -lmemcached)

SYNOPSIS ^

  #include <memcached.h>

  memcached_return
    memcached_increment (memcached_st *ptr, 
                         const char *key, size_t key_length,
                         unsigned int offset,
                         uint64_t *value);

  memcached_return
    memcached_decrement (memcached_st *ptr, 
                         const char *key, size_t key_length,
                         unsigned int offset,
                         uint64_t *value);

DESCRIPTION ^

memcached(1) servers have the ability to increment and decrement keys (overflow and underflow are not detected). This gives you the ability to use memcached to generate shared sequences of values.

memcached_increment() takes a key and keylength and increments the value by the offset passed to it. The value is then returned via the unsigned int value pointer you pass to it.

memcached_decrement() takes a key and keylength and decrements the value by the offset passed to it. The value is then returned via the unsigned int value pointer you pass to it.

RETURN ^

A value of type memcached_return is returned. On success that value will be MEMCACHED_SUCCESS. Use memcached_strerror() to translate this value to a printable string.

HOME ^

To find out more information please check: http://tangent.org/552/libmemcached.html

AUTHOR ^

Brian Aker, <brian@tangent.org>

SEE ALSO ^

memcached(1) libmemcached(3) memcached_strerror(3)