This project is aimed to practice CRUD operations using Redis. It involves setting up and interacting with a TinyURL service, where Redis serves as the backend for storing these links.
sudo docker compose build
sudo docker compose up -d
sudo docker exec -it tinyurl-redis sh
redis-cli
ping
- check if a key exists:
EXISTS key
- set a key-value:
SET key value
- get value by key:
GET key
- delete key:
DEL key
- show all keys:
KEYS *
- set Expiry:
EXPIRE key seconds
- check time-to-live:
TTL key
- set a field in a hash:
HSET key field value
- get a field value from a hash:
HGET key field
- retrieve all fields and values from hash:
HGETALL key
- clear everything:
FLUSHALL