1MEMCACHED_FETCH(3)           libmemcached-awesome           MEMCACHED_FETCH(3)
2
3
4

NAME

6       memcached_fetch - Retrieving data from the server
7

SYNOPSIS

9       #include <libmemcached/memcached.h>
10              Compile and link with -lmemcached
11
12       char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
13       size_t *value_length, uint32_t *flags, memcached_return_t *error)
14              Deprecated since version 0.50: Use memcached_fetch_result()  in‐
15              stead.
16
17

DESCRIPTION

19       memcached_fetch() is used to fetch an individual value from the server.
20       memcached_mget() must always be called before using this  method.   You
21       must pass in a key and its length to fetch the object.
22
23       You  must  supply three pointer variables which will give you the state
24       of the returned object:
25
26          • A uint32_t pointer to contain whatever flags you stored  with  the
27            value,
28
29          • a  size_t pointer which will be filled with size of of the object,
30            and
31
32          • a memcached_return_t pointer to hold any error.
33
34       The object will be returned upon success and NULL will be  returned  on
35       failure.
36
37       MEMCACHED_END is returned by the error value when all objects that have
38       been found are returned.  The final value upon MEMCACHED_END is a  NULL
39       pointer.
40
41       Values returned by memcached_fetch() must be freed by the caller.
42
43       All  of  the  above  functions are not tested when the MEMCACHED_BEHAV‐
44       IOR_USE_UDP has been set. Executing any of these  functions  with  this
45       behavior  on  will result in MEMCACHED_NOT_SUPPORTED being returned, or
46       for those functions which do not return a memcached_return_t, the error
47       function parameter will be set to MEMCACHED_NOT_SUPPORTED.
48

RETURN VALUE

50       memcached_fetch()  sets  error to to MEMCACHED_END upon successful con‐
51       clusion.
52
53       MEMCACHED_NOTFOUND will be return if no keys at all were found.
54
55       MEMCACHED_KEY_TOO_BIG is set to error  whenever  memcached_fetch()  was
56       used  and  the key was set larger then MEMCACHED_MAX_KEY, which was the
57       largest key allowed for the original memcached ascii server.
58

SEE ALSO

60       memcached(1) libmemcached(3) memcached_strerror(3)  memcached_fetch_re‐
61       sult(3)
62
63
64
65
661.1                              Feb 02, 2022               MEMCACHED_FETCH(3)
Impressum