Hard to believe I documented the entire thing... this is a first.
[awesomized/libmemcached] / docs / memcached_get.pod
1 =head1 NAME
2
3 memcached_get, memcached_mget, memcached_fetch
4
5 =head1 LIBRARY
6
7 C Client Library for memcached (libmemcached, -lmemcached)
8
9 =head1 SYNOPSIS
10
11 #include <memcached.h>
12 char *memcached_get(memcached_st *ptr, char *key, size_t key_length,
13 size_t *value_length,
14 uint16_t *flags,
15 memcached_return *error);
16 memcached_return memcached_mget(memcached_st *ptr,
17 char **keys, size_t *key_length,
18 unsigned int number_of_keys);
19 char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
20 size_t *value_length, uint16_t *flags,
21 memcached_return *error);
22
23 =head1 DESCRIPTION
24
25
26 memcached_get() is used to fetch an individual value from the server. You
27 must pass in a key and its length to fetch the object. You must supply
28 three pointer variables which will give you the state of the returned
29 object. A uint16_t pointer to contain whatever flags you stored with the value,
30 a size_t pointer which will be filled with size of of the object, and a
31 memcached_return pointer to hold any error. The object will be returned
32 upon success and NULL will be returned on failure.
33
34 memcached_mget() is used to select multiple keys at once. For multiple key
35 operations it is always faster to use this function. This function always
36 works asyncronously. memcached_fetch() is then used to retrieve any keys
37 found. No error is given on keys that are not found.
38
39 memcached_fetch() is used to fetch an individual value from the server.
40 memcached_mget() must always be called before using this method. You
41 must pass in a key and its length to fetch the object. You must supply
42 three pointer variables which will give you the state of the returned
43 object. A uint16_t pointer to contain whatever flags you stored with the value,
44 a size_t pointer which will be filled with size of of the object, and a
45 memcached_return pointer to hold any error. The object will be returned
46 upon success and NULL will be returned on failure.
47
48 =head1 RETURN
49
50 All objects returned must be freed by the calling application.
51 memcached_get() and memcached_fetch() will return NULL on error. You must
52 look at the value of error() to determine what the actual error was.
53
54 =head1 HOME
55
56 To find out more information please check: http://tangent.org/552/libmemcached.html
57
58 =head1 AUTHOR
59
60 Brian Aker, brian@tangent.org
61
62 =head1 SEE ALSO
63
64 memcached(1) libmemcached(3) memcached_strerror(3)
65
66 =cut
67