- As Trendyol team we developed a new Slack bot to improve the usability of Redis.
- GET key -> Returns the value of the key.
- SET key value -> Sets or updates a key's value in the cache. The ttl is not given, so it remains in
the cache indefinitely.
- SET key value ttl -> Sets or updates key's value which is in the cache. The ttl is given, so it stays
in the cache for the number of seconds you specify.
- DELETE key -> If the key is in the cache, it is deleted.
- LIST ALL -> Displays a list of all keys in the cache.
- HELP -> How to use redis slack bot ?
- PING -> What can i help you ?
- GET my_key_123
- SET my_key_123 "success"
- SET my_key_123 "{"name":"John","age":30,"car":null}"
- SET my_key_123 "{"name":"John","age":30,"car":null}" 30
- SET my_key_123 "success" 30
- DELETE my_key_123
- LIST ALL
- HELP
- PING
- When performing the commands, the same syntax should be used as in the examples. There should be only one space between "COMMAND key value ttl".
Otherwise, you will have entered an incorrect command.
- Also, do not forget to check your key-value pair after setting data by using the get command!
- Java 17
- Spring Boot 3.0 & Spring 6.0
- Redis
- Slack Api Client
For building and running the application, you need:
Environment Variables
SPRING_PROFILES_ACTIVE=prod
REDIS_HOST = Your redis host
REDIS_PASSWORD = Your redis password
NOTIFY_TOKEN = Your slack bot token
CHANNEL_ID = Your slack channel id
mvn clean install
mvn --projects redis-slack-bot spring-boot:run
http://localhost:9723
Distributed under the MIT License. See LICENSE for more information.