site: memcache for 30s the pool status (per algo)

This is the most requested page (used on all pool tabs)

algo var is required to keep selected tr without javascript...
This commit is contained in:
Tanguy Pruvot 2017-07-10 16:05:33 +02:00
parent 25ec9c7d94
commit 135174f7ab

View file

@ -394,7 +394,23 @@ class SiteController extends CommonController
public function actionCurrent_results()
{
// Pool Status : public right panel with all algos and live stats
$algo = user()->getState('yaamp-algo');
$memcache = controller()->memcache->memcache;
$html = memcache_get($memcache, "current_results_".$algo);
if (!empty($html)) {
echo $html;
return;
}
ob_start();
ob_implicit_flush(false);
$this->renderPartial('results/current_results');
$html = ob_get_clean();
echo $html;
memcache_set($memcache, "current_results_".$algo, $html, MEMCACHE_COMPRESSED, 30);
}
public function actionHistory_results()