Made common structure cache.

This cache speedups menu generation on non yet cached pages.

Signed-off-by: Anton Andersen <trianman@gmail.com>