cache portal list, support adding device, refactoring