Latest web development tutorials

perintah Redis Flushdb

Server Redis

Redis Flushdb Perintah ini digunakan untuk menghapus database saat ini dari semua kunci.

tatabahasa

Redis Flushdb sintaks perintah dasar adalah sebagai berikut:

redis 127.0.0.1:6379> FLUSHDB 

versi yang tersedia

> = 1.0.0

Kembali Nilai

Selalu kembali OK.

contoh

redis 127.0.0.1:6379> DBSIZE    # 清空前的 key 数量
(integer) 4

redis 127.0.0.1:6379> FLUSHDB
OK

redis 127.0.0.1:6379> DBSIZE    # 清空后的 key 数量
(integer) 0

Server Redis