1 .TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 08, 2011" "0.47" "libmemcached"
3 memcached_increment_with_initial \- libmemcached Documentation
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
37 C Client Library for memcached (libmemcached, \-lmemcached)
42 #include <libmemcached/memcached.h>
45 memcached_increment (memcached_st *ptr,
46 const char *key, size_t key_length,
51 memcached_decrement (memcached_st *ptr,
52 const char *key, size_t key_length,
57 memcached_increment_with_initial (memcached_st *ptr,
66 memcached_decrement_with_initial (memcached_st *ptr,
75 memcached_increment_by_key (memcached_st *ptr,
76 const char *master_key, size_t master_key_length,
77 const char *key, size_t key_length,
82 memcached_decrement_by_key (memcached_st *ptr,
83 const char *master_key, size_t master_key_length,
84 const char *key, size_t key_length,
89 memcached_increment_with_initial_by_key (memcached_st *ptr,
90 const char *master_key,
91 size_t master_key_length,
100 memcached_decrement_with_initial_by_key (memcached_st *ptr,
101 const char *master_key,
102 size_t master_key_length,
113 memcached(1) servers have the ability to increment and decrement keys
114 (overflow and underflow are not detected). This gives you the ability to use
115 memcached to generate shared sequences of values.
117 memcached_increment() takes a key and keylength and increments the value by
118 the offset passed to it. The value is then returned via the unsigned int
119 value pointer you pass to it.
121 memcached_decrement() takes a key and keylength and decrements the value by
122 the offset passed to it. The value is then returned via the unsigned int
123 value pointer you pass to it.
125 memcached_increment_with_initial() takes a key and keylength and increments
126 the value by the offset passed to it. If the object specified by key does
127 not exist, one of two things may happen: If the expiration value is
128 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
129 expiration values, the operation will succeed by seeding the value for that
130 key with a initial value to expire with the provided expiration time. The
131 flags will be set to zero.The value is then returned via the unsigned int
132 value pointer you pass to it.
134 memcached_decrement_with_initial() takes a key and keylength and decrements
135 the value by the offset passed to it. If the object specified by key does
136 not exist, one of two things may happen: If the expiration value is
137 MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
138 expiration values, the operation will succeed by seeding the value for that
139 key with a initial value to expire with the provided expiration time. The
140 flags will be set to zero.The value is then returned via the unsigned int
141 value pointer you pass to it.
143 memcached_increment_by_key(), memcached_decrement_by_key(),
144 memcached_increment_with_initial_by_key(), and
145 memcached_decrement_with_initial_by_key() are master key equivalents of the
149 A value of type \fBmemcached_return_t\fP is returned.
150 On success that value will be \fBMEMCACHED_SUCCESS\fP.
151 Use memcached_strerror() to translate this value to a printable string.
154 To find out more information please check:
155 \fI\%https://launchpad.net/libmemcached\fP
158 Brian Aker, <\fI\%brian@tangent.org\fP>
161 memcached(1) libmemcached(3) memcached_strerror(3)
166 .\" Generated by docutils manpage writer.