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