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