Optionally use redis as a cache