3 memcached_increment, memcached_decrement,
4 memcached_increment_with_initial, memcached_decrement_with_initial - Manipulate
9 C Client Library for memcached (libmemcached, -lmemcached)
13 #include <memcached.h>
16 memcached_increment (memcached_st *ptr,
17 const char *key, size_t key_length,
22 memcached_decrement (memcached_st *ptr,
23 const char *key, size_t key_length,
28 memcached_increment_with_initial (memcached_st *ptr,
37 memcached_decrement_with_initial (memcached_st *ptr,
47 memcached(1) servers have the ability to increment and decrement keys
48 (overflow and underflow are not detected). This gives you the ability to use
49 memcached to generate shared sequences of values.
51 memcached_increment() takes a key and keylength and increments the value by
52 the offset passed to it. The value is then returned via the unsigned int
53 value pointer you pass to it.
55 memcached_decrement() takes a key and keylength and decrements the value by
56 the offset passed to it. The value is then returned via the unsigned int
57 value pointer you pass to it.
59 memcached_increment_with_initial() takes a key and keylength and increments
60 the value by the offset passed to it. If the object specified by key does
61 not exist, one of two things may happen: If the expiration value is
62 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
63 expiration values, the operation will succeed by seeding the value for that
64 key with a initial value to expire with the provided expiration time. The
65 flags will be set to zero.The value is then returned via the unsigned int
66 value pointer you pass to it.
68 memcached_decrement_with_initial() takes a key and keylength and decrements
69 the value by the offset passed to it. If the object specified by key does
70 not exist, one of two things may happen: If the expiration value is
71 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
72 expiration values, the operation will succeed by seeding the value for that
73 key with a initial value to expire with the provided expiration time. The
74 flags will be set to zero.The value is then returned via the unsigned int
75 value pointer you pass to it.
79 A value of type C<memcached_return> is returned.
80 On success that value will be C<MEMCACHED_SUCCESS>.
81 Use memcached_strerror() to translate this value to a printable string.
85 To find out more information please check:
86 L<http://tangent.org/552/libmemcached.html>
90 Brian Aker, E<lt>brian@tangent.orgE<gt>
94 memcached(1) libmemcached(3) memcached_strerror(3)