til/Development/redis.md

35 lines
376 B
Markdown
Raw Normal View History

2020-02-24 16:04:30 +00:00
# Redis
2020-05-09 16:16:00 +00:00
Docker:
2020-03-11 14:48:59 +00:00
```sh
2020-05-09 16:16:00 +00:00
docker run -d \
-p 6379:6379 \
--name redis \
redis:alpine
2020-02-24 16:04:30 +00:00
```
## redis-cli
2020-05-09 16:16:00 +00:00
`redis-cli` is included in [redis](https://www.archlinux.org/packages/community/x86_64/redis/).
2020-02-24 16:04:30 +00:00
Connect:
```sh
redis-cli -h localhost -p 6379
```
2020-05-09 16:16:00 +00:00
### [Commands](https://redis.io/commands)
2020-02-24 16:04:30 +00:00
Get all keys:
```sh
KEYS *
```
Delete all keys:
```sh
FLUSHALL
```