mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-26 13:20:34 +00:00
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:
parent
25ec9c7d94
commit
135174f7ab
1 changed files with 16 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue