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