【redis】如何清空当前缓存和所有缓存
【linux】操作如下
[root@iZwz96ctwpabqlp3czvpr4Z ~]# find / -name redis-cli
/webDep/redis-5.0.5/bin/redis-cli
/webDep/redis-5.0.5/src/redis-cli
[root@iZwz96ctwpabqlp3czvpr4Z ~]# cd /webDep/redis-5.0.5/bin/
[root@iZwz96ctwpabqlp3czvpr4Z bin]# ./redis-cli -p 6379
127.0.0.1:6379> auth 123456
OK
127.0.0.1:6379> flushdb
OK
127.0.0.1:6379> flushall
OK
127.0.0.1:6379>
【windows】操作如下
C:\Program Files\Redis>dir
驱动器 C 中的卷是 Windows 10
卷的序列号是 02DE-BFF0
C:\Program Files\Redis 的目录
2019/09/19 15:32 <DIR> .
2019/09/19 15:32 <DIR> ..
2019/09/19 15:32 9,569 dump.rdb
2016/07/01 16:27 1,024 EventLog.dll
2016/07/01 16:07 12,509 Redis on Windows Release Notes.docx
2016/07/01 16:07 16,727 Redis on Windows.docx
2016/07/01 16:28 409,088 redis-benchmark.exe
2016/07/01 16:28 4,370,432 redis-benchmark.pdb
2016/07/01 16:28 257,024 redis-check-aof.exe
2016/07/01 16:28 3,518,464 redis-check-aof.pdb
2016/07/01 16:28 499,712 redis-cli.exe
2016/07/01 16:28 4,526,080 redis-cli.pdb
2016/07/01 16:28 1,666,560 redis-server.exe
2016/07/01 16:28 7,081,984 redis-server.pdb
2019/05/16 14:17 48,229 redis.windows-service.conf
2016/07/01 16:07 48,201 redis.windows.conf
2019/09/19 15:33 45,416 server_log.txt
2016/07/01 09:17 14,265 Windows Service Documentation.docx
16 个文件 22,525,284 字节
2 个目录 12,724,371,456 可用字节
C:\Program Files\Redis>redis-cli.exe -p 6379
127.0.0.1:6379> auth 123456
OK
127.0.0.1:6379> flushdb
OK
127.0.0.1:6379> flushall
OK
127.0.0.1:6379>
【客户端】页面操作 flush database
正文到此结束