[server] Add cache support for repo

  - [fix] correct some typos and mistakes mentioned by killing