b752b6eb8861613e8706229ee578d837019b6f17
[awesomized/libmemcached] / docs / source / 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/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 ENVIRONMENT
55 -----------
56
57 .. envvar:: MEMCACHED_SERVERS
58
59 Specify the list of servers.
60
61 SEE ALSO
62 --------
63
64 .. only:: man
65
66 :manpage:`memcached(1)`
67 :manpage:`libmemcached(3)`
68
69 .. only:: html
70
71 * :doc:`/libmemcached`
72 * :doc:`/libmemcached/memcached_flush`