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