diff --git a/lib/classes/appbox.php b/lib/classes/appbox.php index 039c0845cf..df0fa3138f 100644 --- a/lib/classes/appbox.php +++ b/lib/classes/appbox.php @@ -420,8 +420,7 @@ class appbox extends base } /** - * - * @param $option + * @param string $option * @return string */ public function get_cache_key($option = null) diff --git a/lib/classes/phrasea.php b/lib/classes/phrasea.php index db8e07dbc5..98c441d028 100644 --- a/lib/classes/phrasea.php +++ b/lib/classes/phrasea.php @@ -100,7 +100,11 @@ class phrasea { if (!self::$_bas2sbas) { try { - self::$_bas2sbas = $app['phraseanet.appbox']->get_data_from_cache(self::CACHE_SBAS_FROM_BAS); + $data = $app['phraseanet.appbox']->get_data_from_cache(self::CACHE_SBAS_FROM_BAS); + if (!$data) { + throw new \Exception('Could not get sbas from cache'); + } + self::$_bas2sbas = $data; } catch (\Exception $e) { $sql = 'SELECT base_id, sbas_id FROM bas'; $stmt = $app['phraseanet.appbox']->get_connection()->prepare($sql); diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 8b5a71caa6..b8966be706 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -18,10 +18,10 @@ main: path: '/tmp/db.sqlite' charset: UTF8 cache: - type: MemcacheCache + type: RedisCache options: host: localhost - port: 11211 + port: 6379 search-engine: type: elasticsearch # type: phrasea diff --git a/plugins/commands.php b/plugins/commands.php index 886c9d9e2d..fd6ee7fabf 100644 --- a/plugins/commands.php +++ b/plugins/commands.php @@ -6,8 +6,6 @@ use Alchemy\Phrasea\CLI; return call_user_func(function (CLI $cli) { - $app = $cli; if ($app['plugins.manager']->isEnabled('web-gallery-plugin')) { - $cli->command(Alchemy\WebGallery\Command\InstallCommand::create()); $cli->command(Alchemy\WebGallery\Command\UninstallCommand::create()); $cli->command(Alchemy\WebGallery\Command\UpdateCommand::create()); } - + $app = $cli; return $cli; }, $cli);