Default Redis behavior when shut down gracefully… here is a solution to the problem.
Default Redis behavior when shut down gracefully
What is the default behavior of Redis when a commit closes gracefully?
Suppose there are a bunch of keys in Redis. Then the machine needs to be soft restarted due to maintenance needs. All services are gracefully killed and the machine starts again. Is Key still there?
Solution
Redis is configured for data persistence by default, so yes – the key persists across reboots. If you want to change this behavior, please review your redis.conf
file after reading this blog post: http://oldblog.antirez.com/post/redis-persistence-demystified.html