| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::Memcached::CLI::Help; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
6
|
use strict; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
47
|
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
33
|
|
|
5
|
2
|
|
|
2
|
|
29
|
use 5.008_001; |
|
|
2
|
|
|
|
|
5
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
6
|
use version; our $VERSION = 'v0.7.1'; |
|
|
2
|
|
|
|
|
1
|
|
|
|
2
|
|
|
|
|
6
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @COMMANDS_INFO = ( |
|
10
|
|
|
|
|
|
|
+{ |
|
11
|
|
|
|
|
|
|
command => 'help', |
|
12
|
|
|
|
|
|
|
summary => 'Show help (this)', |
|
13
|
|
|
|
|
|
|
}, |
|
14
|
|
|
|
|
|
|
+{ |
|
15
|
|
|
|
|
|
|
command => 'version', |
|
16
|
|
|
|
|
|
|
summary => 'Show server version', |
|
17
|
|
|
|
|
|
|
}, |
|
18
|
|
|
|
|
|
|
+{ |
|
19
|
|
|
|
|
|
|
command => 'quit', |
|
20
|
|
|
|
|
|
|
summary => 'Exit', |
|
21
|
|
|
|
|
|
|
}, |
|
22
|
|
|
|
|
|
|
+{ |
|
23
|
|
|
|
|
|
|
command => 'display', |
|
24
|
|
|
|
|
|
|
summary => 'Display slabs info', |
|
25
|
|
|
|
|
|
|
}, |
|
26
|
|
|
|
|
|
|
+{ |
|
27
|
|
|
|
|
|
|
command => 'stats', |
|
28
|
|
|
|
|
|
|
summary => 'Show stats', |
|
29
|
|
|
|
|
|
|
description => <<'EODESC', |
|
30
|
|
|
|
|
|
|
Usage: |
|
31
|
|
|
|
|
|
|
> stats [] |
|
32
|
|
|
|
|
|
|
> stats # show all stats |
|
33
|
|
|
|
|
|
|
> stats (hit|miss) # filter by REGEXP |
|
34
|
|
|
|
|
|
|
EODESC |
|
35
|
|
|
|
|
|
|
}, |
|
36
|
|
|
|
|
|
|
+{ |
|
37
|
|
|
|
|
|
|
command => 'settings', |
|
38
|
|
|
|
|
|
|
summary => 'Show settings', |
|
39
|
|
|
|
|
|
|
description => <<'EODESC', |
|
40
|
|
|
|
|
|
|
Usage: |
|
41
|
|
|
|
|
|
|
> settings [] |
|
42
|
|
|
|
|
|
|
> settings # show all stats |
|
43
|
|
|
|
|
|
|
> settings ^(lru|slab) # filter by REGEXP |
|
44
|
|
|
|
|
|
|
EODESC |
|
45
|
|
|
|
|
|
|
}, |
|
46
|
|
|
|
|
|
|
+{ |
|
47
|
|
|
|
|
|
|
command => 'cachedump', |
|
48
|
|
|
|
|
|
|
summary => 'Show cachedump of specified slab', |
|
49
|
|
|
|
|
|
|
description => <<'EODESC', |
|
50
|
|
|
|
|
|
|
Usage: |
|
51
|
|
|
|
|
|
|
> cachedump [] |
|
52
|
|
|
|
|
|
|
> cachedump 1 10 |
|
53
|
|
|
|
|
|
|
> cachedump 3 # show default number of items |
|
54
|
|
|
|
|
|
|
EODESC |
|
55
|
|
|
|
|
|
|
}, |
|
56
|
|
|
|
|
|
|
+{ |
|
57
|
|
|
|
|
|
|
command => 'detaildump', |
|
58
|
|
|
|
|
|
|
summary => 'Show detail dump', |
|
59
|
|
|
|
|
|
|
description => <<'EODESC', |
|
60
|
|
|
|
|
|
|
Description: |
|
61
|
|
|
|
|
|
|
Report statistics about data access using KEY prefix. The default separator |
|
62
|
|
|
|
|
|
|
for prefix is ':'. |
|
63
|
|
|
|
|
|
|
If you have not enabled reporting at Memcached start-up, run "detail on". |
|
64
|
|
|
|
|
|
|
See man memcached(1) for details. |
|
65
|
|
|
|
|
|
|
EODESC |
|
66
|
|
|
|
|
|
|
}, |
|
67
|
|
|
|
|
|
|
+{ |
|
68
|
|
|
|
|
|
|
command => 'detail', |
|
69
|
|
|
|
|
|
|
summary => 'Enable/Disable detail dump', |
|
70
|
|
|
|
|
|
|
description => <<'EODESC', |
|
71
|
|
|
|
|
|
|
Usage: |
|
72
|
|
|
|
|
|
|
> detail on |
|
73
|
|
|
|
|
|
|
> detail off |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Description: |
|
76
|
|
|
|
|
|
|
See "\h detaildump" |
|
77
|
|
|
|
|
|
|
EODESC |
|
78
|
|
|
|
|
|
|
}, |
|
79
|
|
|
|
|
|
|
+{ |
|
80
|
|
|
|
|
|
|
command => 'get', |
|
81
|
|
|
|
|
|
|
summary => 'Get data by KEYs', |
|
82
|
|
|
|
|
|
|
description => <<'EODESC', |
|
83
|
|
|
|
|
|
|
Usage: |
|
84
|
|
|
|
|
|
|
> get [ ...] |
|
85
|
|
|
|
|
|
|
EODESC |
|
86
|
|
|
|
|
|
|
}, |
|
87
|
|
|
|
|
|
|
+{ |
|
88
|
|
|
|
|
|
|
command => 'gets', |
|
89
|
|
|
|
|
|
|
summary => 'Get data by KEYs with cas', |
|
90
|
|
|
|
|
|
|
description => <<'EODESC', |
|
91
|
|
|
|
|
|
|
Usage: |
|
92
|
|
|
|
|
|
|
> gets [ ...] |
|
93
|
|
|
|
|
|
|
EODESC |
|
94
|
|
|
|
|
|
|
}, |
|
95
|
|
|
|
|
|
|
+{ |
|
96
|
|
|
|
|
|
|
command => 'set', |
|
97
|
|
|
|
|
|
|
summary => 'Set data by KEY VALUE', |
|
98
|
|
|
|
|
|
|
description => <<'EODESC', |
|
99
|
|
|
|
|
|
|
Usage: |
|
100
|
|
|
|
|
|
|
> set [ []] |
|
101
|
|
|
|
|
|
|
> set mykey1 MyValue1 |
|
102
|
|
|
|
|
|
|
> set mykey2 MyValue2 0 # Never expires. Default |
|
103
|
|
|
|
|
|
|
> set mykey3 MyValue3 120 1 |
|
104
|
|
|
|
|
|
|
EODESC |
|
105
|
|
|
|
|
|
|
}, |
|
106
|
|
|
|
|
|
|
+{ |
|
107
|
|
|
|
|
|
|
command => 'add', |
|
108
|
|
|
|
|
|
|
summary => 'Add data by KEY VALUE', |
|
109
|
|
|
|
|
|
|
description => <<'EODESC', |
|
110
|
|
|
|
|
|
|
Description: |
|
111
|
|
|
|
|
|
|
Store data if server has no data with the KEY. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Usage: |
|
114
|
|
|
|
|
|
|
> add [ []] |
|
115
|
|
|
|
|
|
|
> add mykey1 MyValue1 |
|
116
|
|
|
|
|
|
|
> add mykey2 MyValue2 0 # Never expires. Default |
|
117
|
|
|
|
|
|
|
> add mykey3 MyValue3 120 1 |
|
118
|
|
|
|
|
|
|
EODESC |
|
119
|
|
|
|
|
|
|
}, |
|
120
|
|
|
|
|
|
|
+{ |
|
121
|
|
|
|
|
|
|
command => 'replace', |
|
122
|
|
|
|
|
|
|
summary => 'Replace data by KEY VALUE', |
|
123
|
|
|
|
|
|
|
description => <<'EODESC', |
|
124
|
|
|
|
|
|
|
Description: |
|
125
|
|
|
|
|
|
|
Overwrite data if server has data with the KEY. |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Usage: |
|
128
|
|
|
|
|
|
|
> replace [ []] |
|
129
|
|
|
|
|
|
|
> replace mykey1 MyValue1 |
|
130
|
|
|
|
|
|
|
> replace mykey2 MyValue2 0 # Never expires. Default |
|
131
|
|
|
|
|
|
|
> replace mykey3 MyValue3 120 1 |
|
132
|
|
|
|
|
|
|
EODESC |
|
133
|
|
|
|
|
|
|
}, |
|
134
|
|
|
|
|
|
|
+{ |
|
135
|
|
|
|
|
|
|
command => 'append', |
|
136
|
|
|
|
|
|
|
summary => 'Append data by KEY VALUE', |
|
137
|
|
|
|
|
|
|
description => <<'EODESC', |
|
138
|
|
|
|
|
|
|
Description: |
|
139
|
|
|
|
|
|
|
Append VALUE after existing data which has specified KEY. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Usage: |
|
142
|
|
|
|
|
|
|
> append |
|
143
|
|
|
|
|
|
|
> append mykey MySuffix |
|
144
|
|
|
|
|
|
|
EODESC |
|
145
|
|
|
|
|
|
|
}, |
|
146
|
|
|
|
|
|
|
+{ |
|
147
|
|
|
|
|
|
|
command => 'prepend', |
|
148
|
|
|
|
|
|
|
summary => 'Prepend data by KEY VALUE', |
|
149
|
|
|
|
|
|
|
description => <<'EODESC', |
|
150
|
|
|
|
|
|
|
Description: |
|
151
|
|
|
|
|
|
|
Put VALUE before existing data which has specified KEY. |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Usage: |
|
154
|
|
|
|
|
|
|
> prepend |
|
155
|
|
|
|
|
|
|
> prepend mykey MyPrefix |
|
156
|
|
|
|
|
|
|
EODESC |
|
157
|
|
|
|
|
|
|
}, |
|
158
|
|
|
|
|
|
|
+{ |
|
159
|
|
|
|
|
|
|
command => 'cas', |
|
160
|
|
|
|
|
|
|
summary => 'Set data by KEY VALUE with CAS', |
|
161
|
|
|
|
|
|
|
description => <<'EODESC', |
|
162
|
|
|
|
|
|
|
Description: |
|
163
|
|
|
|
|
|
|
Store data as specified (KEY, VALUE) if CAS of data is not modified. |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Usage: |
|
166
|
|
|
|
|
|
|
> cas [ []] |
|
167
|
|
|
|
|
|
|
> cas mykey1 MyValue1 1 |
|
168
|
|
|
|
|
|
|
> cas mykey2 MyValue2 26 0 # Never expires. Default |
|
169
|
|
|
|
|
|
|
> cas mykey3 MyValue3 355 120 1 |
|
170
|
|
|
|
|
|
|
EODESC |
|
171
|
|
|
|
|
|
|
}, |
|
172
|
|
|
|
|
|
|
+{ |
|
173
|
|
|
|
|
|
|
command => 'touch', |
|
174
|
|
|
|
|
|
|
summary => 'Update data with new EXPIRE', |
|
175
|
|
|
|
|
|
|
description => <<'EODESC', |
|
176
|
|
|
|
|
|
|
Usage: |
|
177
|
|
|
|
|
|
|
> touch |
|
178
|
|
|
|
|
|
|
> touch foo 300 # will expire in 5 min |
|
179
|
|
|
|
|
|
|
> touch bar 0 # will never expire |
|
180
|
|
|
|
|
|
|
EODESC |
|
181
|
|
|
|
|
|
|
}, |
|
182
|
|
|
|
|
|
|
+{ |
|
183
|
|
|
|
|
|
|
command => 'incr', |
|
184
|
|
|
|
|
|
|
summary => 'Add numeric VALUE for a data', |
|
185
|
|
|
|
|
|
|
description => <<'EODESC', |
|
186
|
|
|
|
|
|
|
Usage: |
|
187
|
|
|
|
|
|
|
> incr |
|
188
|
|
|
|
|
|
|
> incr foo 1 |
|
189
|
|
|
|
|
|
|
EODESC |
|
190
|
|
|
|
|
|
|
}, |
|
191
|
|
|
|
|
|
|
+{ |
|
192
|
|
|
|
|
|
|
command => 'decr', |
|
193
|
|
|
|
|
|
|
summary => 'Reduce numeric VALUE from a data', |
|
194
|
|
|
|
|
|
|
description => <<'EODESC', |
|
195
|
|
|
|
|
|
|
Usage: |
|
196
|
|
|
|
|
|
|
> decr |
|
197
|
|
|
|
|
|
|
> decr foo 1 |
|
198
|
|
|
|
|
|
|
EODESC |
|
199
|
|
|
|
|
|
|
}, |
|
200
|
|
|
|
|
|
|
+{ |
|
201
|
|
|
|
|
|
|
command => 'delete', |
|
202
|
|
|
|
|
|
|
summary => 'Delete data by KEY', |
|
203
|
|
|
|
|
|
|
description => <<'EODESC', |
|
204
|
|
|
|
|
|
|
Usage: |
|
205
|
|
|
|
|
|
|
> delete |
|
206
|
|
|
|
|
|
|
EODESC |
|
207
|
|
|
|
|
|
|
}, |
|
208
|
|
|
|
|
|
|
+{ |
|
209
|
|
|
|
|
|
|
command => 'flush_all', |
|
210
|
|
|
|
|
|
|
summary => 'Invalidate whole data', |
|
211
|
|
|
|
|
|
|
description => <<'EODESC', |
|
212
|
|
|
|
|
|
|
Usage: |
|
213
|
|
|
|
|
|
|
> flush_all [] |
|
214
|
|
|
|
|
|
|
> flush_all # Invalidate immediately |
|
215
|
|
|
|
|
|
|
> flush_all 60 # Invalidate after 60 seconds |
|
216
|
|
|
|
|
|
|
EODESC |
|
217
|
|
|
|
|
|
|
}, |
|
218
|
|
|
|
|
|
|
); |
|
219
|
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
1; |
|
221
|
|
|
|
|
|
|
__END__ |