Extract redis to utils.