Merge in documentation updates.
[m6w6/libmemcached] / docs / memcached_delete.rst
1 .. highlight:: perl
2
3
4 memcached_delete
5 ----------------
6
7
8 Delete a key
9
10
11 *******
12 LIBRARY
13 *******
14
15
16 C Client Library for memcached (libmemcached, -lmemcached)
17
18
19 --------
20 SYNOPSIS
21 --------
22
23
24
25 .. code-block:: perl
26
27 #include <libmemcached/memcached.h>
28
29 memcached_return_t
30 memcached_delete (memcached_st *ptr,
31 const char *key, size_t key_length,
32 time_t expiration);
33
34 memcached_return_t
35 memcached_delete_by_key (memcached_st *ptr,
36 const char *master_key, size_t master_key_length,
37 const char *key, size_t key_length,
38 time_t expiration);
39
40
41
42 -----------
43 DESCRIPTION
44 -----------
45
46
47 memcached_delete() is used to delete a particular key.
48 memcached_delete_by_key() works the same, but it takes a master key to
49 find the given value.
50
51 Expiration works by placing the item into a delete queue, which means that
52 it won't possible to retrieve it by the "get" command, but "add" and
53 "replace" command with this key will also fail (the "set" command will
54 succeed, however). After the time passes, the item is finally deleted from server memory.
55
56 Please note the the Danga memcached server removed tests for expiration in
57 the 1.4 version.
58
59
60 ******
61 RETURN
62 ******
63
64
65 A value of type \ ``memcached_return_t``\ is returned
66 On success that value will be \ ``MEMCACHED_SUCCESS``\ .
67 Use memcached_strerror() to translate this value to a printable string.
68
69 If you are using the non-blocking mode of the library, success only
70 means that the message was queued for delivery.
71
72
73 ****
74 HOME
75 ****
76
77
78 To find out more information please check:
79 `https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
80
81
82 ******
83 AUTHOR
84 ******
85
86
87 Brian Aker, <brian@tangent.org>
88
89
90 --------
91 SEE ALSO
92 --------
93
94 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`