Merge pull request #140 from hussainnaqvee/patch-1
[awesomized/libmemcached] / docs / source / bin / memflush.rst
1 memflush
2 ========
3
4 SYNOPSIS
5 --------
6
7 |client_prefix|\flush [options]
8
9 .. program:: memflush
10
11 Reset a server or list of servers
12
13 DESCRIPTION
14 -----------
15
16 :program:`memflush` resets the contents of :manpage:`memcached(1)` servers.
17
18 .. warning::
19
20 This means that all data in the specified servers will be deleted.
21
22 OPTIONS
23 -------
24
25 .. include:: options/common_get.rst
26 .. include:: options/expire.rst
27
28 .. note::
29
30 Using an expiration time (period), all keys, which have not bean updated until expiration will cease to exist.
31
32 Quoting the `memcached protocol documentation`_, it states:
33
34 Its effect is to invalidate all
35 existing items immediately (by default) or after the expiration
36 specified. After invalidation none of the items will be returned in
37 response to a retrieval command (unless it's stored again under the
38 same key *after* flush_all has invalidated the items).
39
40 The most precise
41 definition of what flush_all does is the following: it causes all
42 items whose update time is earlier than the time at which flush_all
43 was set to be executed to be ignored for retrieval purposes.
44
45 The intent of flush_all with a delay, was that in a setting where you
46 have a pool of memcached servers, and you need to flush all content,
47 you have the option of not resetting all memcached servers at the
48 same time (which could e.g. cause a spike in database load with all
49 clients suddenly needing to recreate content that would otherwise
50 have been found in the memcached daemon).
51
52 .. _memcached protocol documentation: https://github.com/memcached/memcached/blob/master/doc/protocol.txt
53
54
55 .. include:: common/env.rst
56
57 NOTES
58 -----
59
60 .. include:: common/note_program_prefix.rst
61
62 SEE ALSO
63 --------
64
65 .. only:: man
66
67 :manpage:`memcached(1)`
68 :manpage:`libmemcached(3)`
69
70 .. only:: html
71
72 * :doc:`/libmemcached`
73 * :doc:`/libmemcached/memcached_flush`