forked from huangzworks/redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
646 lines (625 loc) · 39.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Redis 命令参考 — Redis 命令参考</title>
<link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.8',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Redis 命令参考" href="#" />
<link rel="next" title="Key(键)" href="key/index.html" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="key/index.html" title="Key(键)"
accesskey="N">next</a> |</li>
<li><a href="#">Redis 命令参考</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="redis">
<h1>Redis 命令参考<a class="headerlink" href="#redis" title="Permalink to this headline">¶</a></h1>
<p>本文档是 <a class="reference external" href="http://redis.io/commands">Redis Command Reference</a> 和 <a class="reference external" href="http://redis.io/documentation">Redis Documentation</a> 的中文翻译版,
阅读这个文档可以帮助你了解 Redis 命令的具体使用方法,
并学会如何使用 Redis 的事务、持久化、复制、Sentinel、集群等功能。</p>
<div class="section" id="ctrl-f">
<h2>命令目录(使用 CTRL + F 快速查找):<a class="headerlink" href="#ctrl-f" title="Permalink to this headline">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="key/index.html">Key(键)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="key/del.html">DEL</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/dump.html">DUMP</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/exists.html">EXISTS</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/expire.html">EXPIRE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/expireat.html">EXPIREAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/keys.html">KEYS</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/migrate.html">MIGRATE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/move.html">MOVE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/object.html">OBJECT</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/persist.html">PERSIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/pexpire.html">PEXPIRE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/pexpireat.html">PEXPIREAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/pttl.html">PTTL</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/randomkey.html">RANDOMKEY</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/rename.html">RENAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/renamenx.html">RENAMENX</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/restore.html">RESTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/sort.html">SORT</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/ttl.html">TTL</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/type.html">TYPE</a></li>
<li class="toctree-l2"><a class="reference internal" href="key/scan.html">SCAN</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="string/index.html">String(字符串)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="string/append.html">APPEND</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/bitcount.html">BITCOUNT</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/bitop.html">BITOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/bitfield.html">BITFIELD</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/decr.html">DECR</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/decrby.html">DECRBY</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/get.html">GET</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/getbit.html">GETBIT</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/getrange.html">GETRANGE</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/getset.html">GETSET</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/incr.html">INCR</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/incrby.html">INCRBY</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/incrbyfloat.html">INCRBYFLOAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/mget.html">MGET</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/mset.html">MSET</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/msetnx.html">MSETNX</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/psetex.html">PSETEX</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/set.html">SET</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/setbit.html">SETBIT</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/setex.html">SETEX</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/setnx.html">SETNX</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/setrange.html">SETRANGE</a></li>
<li class="toctree-l2"><a class="reference internal" href="string/strlen.html">STRLEN</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="hash/index.html">Hash(哈希表)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="hash/hdel.html">HDEL</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hexists.html">HEXISTS</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hget.html">HGET</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hgetall.html">HGETALL</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hincrby.html">HINCRBY</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hincrbyfloat.html">HINCRBYFLOAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hkeys.html">HKEYS</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hlen.html">HLEN</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hmget.html">HMGET</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hmset.html">HMSET</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hset.html">HSET</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hsetnx.html">HSETNX</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hvals.html">HVALS</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hscan.html">HSCAN</a></li>
<li class="toctree-l2"><a class="reference internal" href="hash/hstrlen.html">HSTRLEN</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="list/index.html">List(列表)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="list/blpop.html">BLPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/brpop.html">BRPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/brpoplpush.html">BRPOPLPUSH</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lindex.html">LINDEX</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/linsert.html">LINSERT</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/llen.html">LLEN</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lpop.html">LPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lpush.html">LPUSH</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lpushx.html">LPUSHX</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lrange.html">LRANGE</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lrem.html">LREM</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/lset.html">LSET</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/ltrim.html">LTRIM</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/rpop.html">RPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/rpoplpush.html">RPOPLPUSH</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/rpush.html">RPUSH</a></li>
<li class="toctree-l2"><a class="reference internal" href="list/rpushx.html">RPUSHX</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
<tr class="row-even"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="set/index.html">Set(集合)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="set/sadd.html">SADD</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/scard.html">SCARD</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sdiff.html">SDIFF</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sdiffstore.html">SDIFFSTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sinter.html">SINTER</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sinterstore.html">SINTERSTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sismember.html">SISMEMBER</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/smembers.html">SMEMBERS</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/smove.html">SMOVE</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/spop.html">SPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/srandmember.html">SRANDMEMBER</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/srem.html">SREM</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sunion.html">SUNION</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sunionstore.html">SUNIONSTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="set/sscan.html">SSCAN</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="sorted_set/index.html">SortedSet(有序集合)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zadd.html">ZADD</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zcard.html">ZCARD</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zcount.html">ZCOUNT</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zincrby.html">ZINCRBY</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrange.html">ZRANGE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrangebyscore.html">ZRANGEBYSCORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrank.html">ZRANK</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrem.html">ZREM</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zremrangebyrank.html">ZREMRANGEBYRANK</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zremrangebyscore.html">ZREMRANGEBYSCORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrevrange.html">ZREVRANGE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrevrangebyscore.html">ZREVRANGEBYSCORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrevrank.html">ZREVRANK</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zscore.html">ZSCORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zunionstore.html">ZUNIONSTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zinterstore.html">ZINTERSTORE</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zscan.html">ZSCAN</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zrangebylex.html">ZRANGEBYLEX</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zlexcount.html">ZLEXCOUNT</a></li>
<li class="toctree-l2"><a class="reference internal" href="sorted_set/zremrangebylex.html">ZREMRANGEBYLEX</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="hyperloglog/index.html">HyperLogLog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="hyperloglog/pfadd.html">PFADD</a></li>
<li class="toctree-l2"><a class="reference internal" href="hyperloglog/pfcount.html">PFCOUNT</a></li>
<li class="toctree-l2"><a class="reference internal" href="hyperloglog/pfmerge.html">PFMERGE</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="geo/index.html">GEO(地理位置)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="geo/geoadd.html">GEOADD</a></li>
<li class="toctree-l2"><a class="reference internal" href="geo/geopos.html">GEOPOS</a></li>
<li class="toctree-l2"><a class="reference internal" href="geo/geodist.html">GEODIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="geo/georadius.html">GEORADIUS</a></li>
<li class="toctree-l2"><a class="reference internal" href="geo/georadiusbymember.html">GEORADIUSBYMEMBER</a></li>
<li class="toctree-l2"><a class="reference internal" href="geo/geohash.html">GEOHASH</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
<tr class="row-odd"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="pub_sub/index.html">Pub/Sub(发布/订阅)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/psubscribe.html">PSUBSCRIBE</a></li>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/publish.html">PUBLISH</a></li>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/pubsub.html">PUBSUB</a></li>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/punsubscribe.html">PUNSUBSCRIBE</a></li>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/subscribe.html">SUBSCRIBE</a></li>
<li class="toctree-l2"><a class="reference internal" href="pub_sub/unsubscribe.html">UNSUBSCRIBE</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="transaction/index.html">Transaction(事务)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="transaction/discard.html">DISCARD</a></li>
<li class="toctree-l2"><a class="reference internal" href="transaction/exec.html">EXEC</a></li>
<li class="toctree-l2"><a class="reference internal" href="transaction/multi.html">MULTI</a></li>
<li class="toctree-l2"><a class="reference internal" href="transaction/unwatch.html">UNWATCH</a></li>
<li class="toctree-l2"><a class="reference internal" href="transaction/watch.html">WATCH</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="script/index.html">Script(脚本)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="script/eval.html">EVAL</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/evalsha.html">EVALSHA</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/script_exists.html">SCRIPT EXISTS</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/script_flush.html">SCRIPT FLUSH</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/script_kill.html">SCRIPT KILL</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/script_load.html">SCRIPT LOAD</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="connection/index.html">Connection(连接)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="connection/auth.html">AUTH</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection/echo.html">ECHO</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection/ping.html">PING</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection/quit.html">QUIT</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection/select.html">SELECT</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
<tr class="row-even"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="server/index.html">Server(服务器)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="server/bgrewriteaof.html">BGREWRITEAOF</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/bgsave.html">BGSAVE</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/client_getname.html">CLIENT GETNAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/client_kill.html">CLIENT KILL</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/client_list.html">CLIENT LIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/client_setname.html">CLIENT SETNAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/config_get.html">CONFIG GET</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/config_resetstat.html">CONFIG RESETSTAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/config_rewrite.html">CONFIG REWRITE</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/config_set.html">CONFIG SET</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/dbsize.html">DBSIZE</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/debug_object.html">DEBUG OBJECT</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/debug_segfault.html">DEBUG SEGFAULT</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/flushall.html">FLUSHALL</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/flushdb.html">FLUSHDB</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/info.html">INFO</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/lastsave.html">LASTSAVE</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/monitor.html">MONITOR</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/psync.html">PSYNC</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/save.html">SAVE</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/shutdown.html">SHUTDOWN</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/slaveof.html">SLAVEOF</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/slowlog.html">SLOWLOG</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/sync.html">SYNC</a></li>
<li class="toctree-l2"><a class="reference internal" href="server/time.html">TIME</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1">
<h2>文档<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<p>以下文章翻译自 <a class="reference external" href="http://redis.io/documentation">redis.io/documentation</a> 文档。</p>
<table border="1" class="docutils">
<colgroup>
<col width="32%" />
<col width="37%" />
<col width="32%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/notification.html">键空间通知(keyspace notification)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/notification.html#id1">功能概览</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/notification.html#id2">事件的类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/notification.html#id3">配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/notification.html#id4">命令产生的通知</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/notification.html#id5">过期通知的发送时间</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/transaction.html">事务(transaction)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#id1">用法</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#id2">事务中的错误</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#redis-roll-back">为什么 Redis 不支持回滚(roll back)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#id3">放弃事务</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#check-and-set">使用 check-and-set 操作实现乐观锁</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#watch">了解 WATCH</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#watch-zpop">使用 WATCH 实现 ZPOP</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/transaction.html#redis">Redis 脚本和事务</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/pubsub.html">发布与订阅(pub/sub)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id2">信息的格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id3">订阅模式</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id4">通过频道和模式接收同一条信息</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id5">订阅总数</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id6">编程示例</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/pubsub.html#id8">客户端库实现提示</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
<tr class="row-even"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/replication.html">复制(Replication)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id1">关闭主服务器持久化时,复制功能的数据安全</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id2">复制功能的运作原理</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id3">部分重同步</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id4">配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id5">只读从服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#id6">从服务器相关配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/replication.html#n">主服务器只在有至少 N 个从服务器的情况下,才执行写操作</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/protocol.html">通信协议(protocol)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id1">网络层</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id2">请求</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id3">新版统一请求协议</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id4">回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id5">状态回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id6">错误回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id7">整数回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id8">批量回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id9">多条批量回复</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id10">多条批量回复中的空元素</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id11">多命令和流水线</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#id12">内联命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/protocol.html#redis">高性能 Redis 协议分析器</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/persistence.html">持久化(persistence)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#redis">Redis 持久化</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#rdb">RDB 的优点</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id3">RDB 的缺点</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#aof">AOF 的优点</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id4">AOF 的缺点</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#rdb-aof">RDB 和 AOF ,我应该用哪一个?</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id5">RDB 快照</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id6">快照的运作方式</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#append-only-file-aof">只进行追加操作的文件(append-only file,AOF)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id7">AOF 重写</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id8">AOF 的耐久性如何?</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id9">如果 AOF 文件出错了,怎么办?</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id10">AOF 的运作方式</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id11">怎么从 RDB 持久化切换到 AOF 持久化</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id12">RDB 和 AOF 之间的相互作用</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id13">备份 Redis 数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/persistence.html#id14">容灾备份</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
<tr class="row-odd"><td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/sentinel.html">Sentinel</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id2">获取 Sentinel</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id3">启动 Sentinel</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id4">配置 Sentinel</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id5">主观下线和客观下线</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id6">每个 Sentinel 都需要定期执行的任务</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id7">自动发现 Sentinel 和从服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#sentinel-api">Sentinel API</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id10">故障转移</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#tilt">TILT 模式</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#busy">处理 <code class="docutils literal"><span class="pre">-BUSY</span></code> 状态</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/sentinel.html#id14">Sentinel 的客户端实现</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/cluster-tutorial.html">集群教程</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id2">集群简介</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id3">Redis 集群数据共享</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id4">Redis 集群中的主从复制</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#redis-guarantee">Redis 集群的一致性保证(guarantee)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id5">创建并使用 Redis 集群</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id7">创建集群</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id8">集群的客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#redis-rb-cluster">使用 <code class="docutils literal"><span class="pre">redis-rb-cluster</span></code> 编写一个示例应用</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id10">对集群进行重新分片</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id11">一个更有趣的示例应用</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id13">故障转移测试</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id14">添加新节点到集群</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-tutorial.html#id15">移除一个节点</a></li>
</ul>
</li>
</ul>
</div>
</td>
<td><div class="toctree-wrapper first last compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="topic/cluster-spec.html">Redis 集群规范</a><ul>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id1">引言</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id2">什么是 Redis 集群?</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id3">Redis 集群实现的功能子集</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id4">Redis 集群协议中的客户端和服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id5">键分布模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id6">集群节点属性</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id7">节点握手(已实现)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#moved">MOVED 转向</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#live-reconfiguration">集群在线重配置(live reconfiguration)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#ask">ASK 转向</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id8">容错</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#id12">发布/订阅(已实现,但仍然需要改善)</a></li>
<li class="toctree-l2"><a class="reference internal" href="topic/cluster-spec.html#a-crc16-ansi">附录 A: CRC16 算法的 ANSI 实现参考</a></li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id2">
<h2>关于<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<p>本文档由 <a class="reference external" href="http://www.huangz.me">黄健宏(huangz)</a> 翻译,
版权归 Redis 官方所有。</p>
<p><a class="reference internal" href="change_log.html#change-log"><span>更新日志(change log)</span></a> 列出了本文档的主要更新细节,
你也可以通过关注 <a class="reference external" href="https://github.com/huangz1990/redis">文档的 github 项目</a> 来随时追踪文档的最新更新信息。</p>
<p>有任何问题、意见或建议,
请在文档配套的 disqus 论坛里留言,
或者直接联系译者。</p>
</div>
<div class="section" id="id3">
<h2>Redis 书籍推荐<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
<img alt="_images/cover.png" class="align-left" src="_images/cover.png" />
<p>由本文档译者黄健宏创作的《Redis 设计与实现》一书正在销售中,
该书详细地介绍了 Redis 内部的运作原理以及各项功能的实现原理,
是一本致力于帮助 Redis 使用者加深对 Redis 的理解,
并且更高效地使用 Redis 的书籍。</p>
<div class="line-block">
<div class="line">欢迎访问 <a class="reference external" href="http://www.RedisBook.com">RedisBook.com</a> 并了解《Redis 设计与实现》的更多相关信息。</div>
<div class="line"><br /></div>
<div class="line"><br /></div>
</div>
<hr class="docutils" />
<img alt="_images/riacn-cover.png" class="align-left" src="_images/riacn-cover.png" />
<p>由《Redis命令参考》的译者黄健宏翻译的《Redis实战》一书正在火热发售中,
该书深入浅出地介绍了 Redis 的五种数据结构,
并通过一系列实用的示例深刻地展示了 Redis 的用法。
此外,
《Redis实战》还介绍了多种扩展和优化 Redis 的方法,
无论是 Redis 新手还是有一定经验的 Redis 使用者,
应该都能从此书中获益。</p>
<p>欢迎访问 <a class="reference external" href="http://redisinaction.com">redisinaction.com</a> 并了解《Redis实战》的更多相关信息。</p>
<hr class="docutils" />
<img alt="_images/redis-logo-single.png" class="align-left" src="_images/redis-logo-single.png" />
<p>由本文档译者制作的《Redis命令速查表》正在销售中!
该表能够与本文档相辅相成,
帮助读者更好地了解和查阅 Redis 命令,
有兴趣的读者可以通过访问以下链接来了解更多信息:
<a class="reference external" href="https://selfstore.io/products/538">https://selfstore.io/products/538</a></p>
</div>
<div class="section" id="id4">
<h2>参加群讨论<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<p>欢迎各位《Redis命令参考》读者加入以下 QQ 群:</p>
<ul class="simple">
<li>IT 技术讨论 1 群,群号 398976550 ,旧群,目前人数已饱和</li>
<li>IT 技术讨论 2 群,群号 186200307 ,新群,名额很多,推荐加入</li>
</ul>
<p>你可以在群里面分享你的 Redis 使用心得,
又或者跟其他人讨论你在使用 Redis 过程中遇到的问题。</p>
</div>
</div>
<div class="section" id="discuss">
<h2>
讨论
<a class="headerlink" href="#discuss" title="永久链接至标题">¶</a>
</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'redis-command-cn'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div id="sponser">
<h2>赞助商</h2>
<p>我们正在寻找赞助商,有意对这个网站进行赞助的朋友请联系 [email protected] 。</p>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="key/index.html" title="Key(键)"
>next</a> |</li>
<li><a href="#">Redis 命令参考</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2015, Redis.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-53959484-7', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>