Move generate_page().
Add method and control structure for getting page

Attempt to get page from cache. If it is not found, start the output
buffer, get the HTML, cache the page and print the result.
Exit after print cached page.