add redis to a class.