refactor redis config