Cache the generated menus