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