redis添加数据不是加在原数据的后面?
PHP中文网
PHP中文网 2017-04-24 16:00:24
0
1
790

这是redis中原有的数据:

 1) "url:/doi/10.1002/anie.201601258/full"
 2) "url:/doi/10.1002/anie.201601883/full"
 3) "url:/doi/10.1002/anie.201600911/full"
 4) "url:/doi/10.1002/anie.201509978/full"
 5) "url:/doi/10.1002/anie.201601016/full"
 6) "url:/doi/10.1002/anie.201600841/full"
 7) "url:/doi/10.1002/anie.201511733/full"
 8) "url:/doi/10.1002/anie.201600918/full"
 9) "url:/doi/10.1002/anie.201601042/full"
10) "url:/doi/10.1002/anie.201601120/full"
11) "url:/doi/10.1002/anie.201602071/full"
12) "url:/doi/10.1002/anie.201509601/full"
13) "url:/doi/10.1002/anie.201511065/full"
14) "url:/doi/10.1002/anie.201601238/full"
15) "url:/doi/10.1002/anie.201510994/full"
16) "url:/doi/10.1002/anie.201601082/full"
17) "url:/doi/10.1002/anie.201509260/full"
18) "url:/doi/10.1002/anie.201601621/full"
19) "url:/doi/10.1002/anie.201510748/full"
20) "url:/doi/10.1002/anie.201601003/full"

Redis.set了三条数据,如下:

     1) "url:/doi/10.1002/anie.201601258/full"
 2) "url:/doi/10.1002/anie.201601883/full"
 3) "url:/doi/10.1002/anie.201600911/full"
 4) "url:http://www.peintopython.net/"
 5) "url:/doi/10.1002/anie.201509978/full"
 6) "url:http://www.brpreiss.com/books/opus7/html/book.html"
 7) "url:/doi/10.1002/anie.201601016/full"
 8) "url:/doi/10.1002/anie.201600841/full"
 9) "url:/doi/10.1002/anie.201511733/full"
10) "url:/doi/10.1002/anie.201600918/full"
11) "url:/doi/10.1002/anie.201601042/full"
12) "url:/doi/10.1002/anie.201601120/full"
13) "url:/doi/10.1002/anie.201602071/full"
14) "url:/doi/10.1002/anie.201509601/full"
15) "url:http://www.pearsonhighered.com/educator/academic/product/0,,0130260363,00%2Ben-USS_01DBC.html"
16) "url:/doi/10.1002/anie.201511065/full"
17) "url:/doi/10.1002/anie.201601238/full"
18) "url:/doi/10.1002/anie.201510994/full"
19) "url:/doi/10.1002/anie.201601082/full"
20) "url:/doi/10.1002/anie.201509260/full"
21) "url:/doi/10.1002/anie.201601621/full"
22) "url:/doi/10.1002/anie.201510748/full"
23) "url:/doi/10.1002/anie.201601003/full"

但是穿插在里面,为什么?
刚学redis,请教。

PHP中文网
PHP中文网

认证0级讲师

répondre à tous(1)
習慣沉默

L'ensemble n'est pas ordonné par définition. Quelle que soit la façon dont le programme est enregistré, vous ne devez pas croire qu'il peut vous donner l'ordre d'origine. Si vous souhaitez commander, utilisez List.

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal