Mercurial > hg > batmud > maputils
diff www/info.php @ 1150:02fe48a608d7
Use APC for caching of location and wizard data.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 21 Jul 2011 20:38:06 +0300 |
parents | 52550f58cee5 |
children | ab28c4ddf8b0 |
line wrap: on
line diff
--- a/www/info.php Thu Jul 21 20:36:17 2011 +0300 +++ b/www/info.php Thu Jul 21 20:38:06 2011 +0300 @@ -36,8 +36,16 @@ </div> <? -$locTable = readLocationFiles(); -$wizTable = readWizInfoFiles(); +$locTable = apc_fetch("info_locTable"); +if (empty($locTable)) { + $locTable = readLocationFiles(); + apc_store("info_locTable", $locTable, 3600); +} +$wizTable = apc_fetch("wizTable"); +if (empty($wizTable)) { + $wizTable = readWizInfoFiles(); + apc_store("wizTable", $wizTable, 3600); +} if (isset($_GET["a"])) {