improve redis and session structure.