merge in brian's change to "Update for async delete"
[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
13 char *memcached_get (memcached_st *ptr,
14 char *key, size_t key_length,
15 size_t *value_length,
16 uint16_t *flags,
17 memcached_return *error);
18
19 memcached_return
20 memcached_mget (memcached_st *ptr,
21 char **keys, size_t *key_length,
22 unsigned int number_of_keys);
23
24 char *memcached_fetch (memcached_st *ptr,
25 char *key, size_t *key_length,
26 size_t *value_length,
27 uint16_t *flags,
28 memcached_return *error);
29
30 =head1 DESCRIPTION
31
32 memcached_get() is used to fetch an individual value from the server. You
33 must pass in a key and its length to fetch the object. You must supply
34 three pointer variables which will give you the state of the returned
35 object. A uint16_t pointer to contain whatever flags you stored with the value,
36 a size_t pointer which will be filled with size of of the object, and a
37 memcached_return pointer to hold any error. The object will be returned
38 upon success and NULL will be returned on failure.
39
40 memcached_mget() is used to select multiple keys at once. For multiple key
41 operations it is always faster to use this function. This function always
42 works asynchronously. memcached_fetch() is then used to retrieve any keys
43 found. No error is given on keys that are not found.
44
45 memcached_fetch() is used to fetch an individual value from the server.
46 memcached_mget() must always be called before using this method. You
47 must pass in a key and its length to fetch the object. You must supply
48 three pointer variables which will give you the state of the returned
49 object. A uint16_t pointer to contain whatever flags you stored with the value,
50 a size_t pointer which will be filled with size of of the object, and a
51 memcached_return pointer to hold any error. The object will be returned
52 upon success and NULL will be returned on failure.
53
54 =head1 RETURN
55
56 All objects returned must be freed by the calling application.
57 memcached_get() and memcached_fetch() will return NULL on error. You must
58 look at the value of error to determine what the actual error was.
59
60 =head1 HOME
61
62 To find out more information please check:
63 L<http://tangent.org/552/libmemcached.html>
64
65 =head1 AUTHOR
66
67 Brian Aker, E<lt>brian@tangent.orgE<gt>
68
69 =head1 SEE ALSO
70
71 memcached(1) libmemcached(3) memcached_strerror(3)
72
73 =cut
74