refactor method get redis value