451e8e9fe79ddbe6cd2b05b0911e079934c9a0fa
[awesomized/libmemcached] / docs / source / libmemcached / memcached_flush.rst
1 =====================================
2 Wiping clean the contents of a server
3 =====================================
4
5 .. index:: object: memcached_st
6
7 Wipe contents of memcached servers
8
9 --------
10 SYNOPSIS
11 --------
12
13 #include <libmemcached/memcached.h>
14
15 .. function:: memcached_return_t memcached_flush (memcached_st *ptr, time_t expiration)
16
17 Compile and link with -lmemcached
18
19 -----------
20 DESCRIPTION
21 -----------
22
23 :func::`memcached_flush` is used to wipe clean the contents of :program:`memcached` servers.
24 It will either do this immediately or expire the content based on the
25 expiration time passed to the method (a value of zero causes an immediate
26 flush). The operation is not atomic to multiple servers, just atomic to a
27 single server. That is, it will flush the servers in the order that they were
28 added.
29
30 RETURN
31 ------
32
33 A value of type :type:`memcached_return_t` is returned
34 On success that value will be `MEMCACHED_SUCCESS`.
35 Use :type:`memcached_strerror` to translate this value to a printable string.
36
37 --------
38 SEE ALSO
39 --------
40
41 .. only:: man
42
43 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`