Mercurial > hg > batmud > maputils
diff www/loc.php @ 1151:e0794ddb605e
Add output caching to main page and location page.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 21 Jul 2011 20:38:41 +0300 |
parents | 02fe48a608d7 |
children | b245f3162a27 |
line wrap: on
line diff
--- a/www/loc.php Thu Jul 21 20:38:06 2011 +0300 +++ b/www/loc.php Thu Jul 21 20:38:41 2011 +0300 @@ -97,9 +97,14 @@ } } +if (empty($errorStr) && fetchPageFromCache()) { + exit; +} /* Start of the page */ +ob_start(); + printPageHeader($pageTitle." - Locations", "<script type=\"text/javascript\" src=\"tooltip.js\"></script>\n". "<meta name=\"robots\" content=\"nofollow\" />\n"); @@ -377,3 +382,7 @@ ?> </body> </html> +<? +if (empty($errorStr)) + storePageToCache(); +?> \ No newline at end of file