diff --git a/src/public/top.php b/src/public/top.php index 4627afd..2fa2729 100644 --- a/src/public/top.php +++ b/src/public/top.php @@ -5,6 +5,7 @@ require_once(__DIR__ . '/../config/app.php'); require_once(__DIR__ . '/../library/filter.php'); require_once(__DIR__ . '/../library/mysql.php'); require_once(__DIR__ . '/../library/sphinxql.php'); +require_once(__DIR__ . '/../../vendor/autoload.php'); // Connect Sphinx search server try { @@ -30,6 +31,18 @@ try { exit; } +// Connect Yggverse\Cache\Memory +try { + + $memory = new Yggverse\Cache\Memory(MEMCACHED_HOST, MEMCACHED_PORT, MEMCACHED_NAMESPACE, MEMCACHED_TIMEOUT + time()); + +} catch(Exception $e) { + + var_dump($e); + + exit; +} + // Define page basics $totalPages = $sphinx->getHostPagesTotal(); @@ -38,6 +51,7 @@ $placeholder = Filter::plural($totalPages, [sprintf(_('Over %s page or enter the sprintf(_('Over %s pages or enter the new one...'), number_format($totalPages)), ]); + ?> @@ -245,7 +259,7 @@ $placeholder = Filter::plural($totalPages, [sprintf(_('Over %s page or enter the
- getTopHostPages()) { ?> + getByMethodCallback($db, 'getTopHostPages', [], time() + 86400)) { ?>