Cache the output, not the HTML page. This also fixes the issue of the cache never refreshing.