|
|
|
@ -53,25 +53,9 @@ class RoomController extends AbstractController
@@ -53,25 +53,9 @@ class RoomController extends AbstractController
|
|
|
|
|
$this->getParameter('app.kevacoin.password') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Connect memcached |
|
|
|
|
$memcached = new \Memcached(); |
|
|
|
|
$memcached->addServer( |
|
|
|
|
$this->getParameter('app.memcached.host'), |
|
|
|
|
$this->getParameter('app.memcached.port') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$memory = md5( |
|
|
|
|
sprintf( |
|
|
|
|
'%s.RoomController::list:rooms', |
|
|
|
|
__DIR__ |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Get room list |
|
|
|
|
$list = []; |
|
|
|
|
|
|
|
|
|
if (!$list = $memcached->get($memory)) |
|
|
|
|
{ |
|
|
|
|
foreach ((array) $client->kevaListNamespaces() as $value) |
|
|
|
|
{ |
|
|
|
|
// Calculate room totals |
|
|
|
@ -117,14 +101,6 @@ class RoomController extends AbstractController
@@ -117,14 +101,6 @@ class RoomController extends AbstractController
|
|
|
|
|
$list |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Cache rooms to memcached as kevaListNamespaces hides rooms with pending posts |
|
|
|
|
$memcached->set( |
|
|
|
|
$memory, |
|
|
|
|
$list, |
|
|
|
|
(int) $this->getParameter('app.memcached.timeout') |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// RSS |
|
|
|
|
if ('rss' === $request->get('feed')) |
|
|
|
|
{ |
|
|
|
|