Added the Redis functionality, see comments