Switch to redis for thread-safety