load repository from a cached file. fix serialization bug where scalar type was serialized incorrectly.