generator cache
speed up add_moduleinfo, remove unnecessary queries