From 74781794c79a3e53148f134a5e9b0d72f131b59d Mon Sep 17 00:00:00 2001 From: Tran Hau Date: Mon, 24 Feb 2020 23:04:30 +0700 Subject: [PATCH] redis --- redis.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 redis.md diff --git a/redis.md b/redis.md new file mode 100644 index 0000000..1d4e72e --- /dev/null +++ b/redis.md @@ -0,0 +1,35 @@ +# Redis + +Assume you use Archlinux. + +Read [Redis](https://wiki.archlinux.org/index.php/Redis). + +Use docker: + +```sh +docker run -d -p 6379:6379 --name redis redis:alpine +``` + +## redis-cli + +Connect: + +```sh +redis-cli -h localhost -p 6379 +``` + +### After connect + +Get all keys: + +```sh +KEYS * +``` + +Delete all keys: + +```sh +FLUSHALL +``` + +Read [Commands](https://redis.io/commands).