Cache master IDs