1 .TH "MEMCACHED_FETCH" "3" "January 26, 2012" "1.0.3" "libmemcached"
3 memcached_fetch \- Retrieving data from the server
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.
35 #include <libmemcached/memcached.h>
38 .B char *memcached_fetch(memcached_st\fI\ *ptr\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
39 Deprecated since version 0.50: Use \fBmemcached_fetch_result()\fP instead.
42 Compile and link with \-lmemcached
45 \fI\%memcached_fetch()\fP is used to fetch an individual value from the server. \fBmemcached_mget()\fP must always be called before using this method.
46 You must pass in a key and its length to fetch the object. You must supply
47 three pointer variables which will give you the state of the returned
48 object. A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
49 object, and a \fBmemcached_return_t\fP pointer to hold any error. The
50 object will be returned upon success and NULL will be returned on failure. \fBMEMCACHD_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
52 Values returned by \fI\%memcached_fetch()\fP must be freed by the caller.
54 All of the above functions are not tested when the
55 \fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
56 functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP.
59 \fI\%memcached_fetch()\fP sets error to
60 to \fBMEMCACHED_END\fP upon successful conclusion.
61 \fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
63 \fBMEMCACHED_KEY_TOO_BIG\fP is set to error whenever :c:\fBmemcached_fetch()\fP was used
64 and the key was set larger then \fBMEMCACHED_MAX_KEY\fP, which was the largest
65 key allowed for the original memcached ascii server.
68 To find out more information please check:
69 \fI\%http://libmemcached.org/\fP
72 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_fetch_result(3)\fP
76 2011, Brian Aker DataDifferential, http://datadifferential.com/
77 .\" Generated by docutils manpage writer.