Made common structure cache.

This cache speedups menu generation on non yet cached pages.
Cache time recived from the system's 'cache_expires' setting.

Signed-off-by: Anton Andersen <trianman@gmail.com>