get types from server or cache