One way to overcome the problem is to use a connection pool. I am using JedisPool. Although I cannot find anywhere in the documentation that JedisPool supports automatic reconnection, in my tests I can continue to use the Redis cache after restarting the service.
lettuce, , .