From bad45316bcc7adb598703bde7afcf7cdc13b6408 Mon Sep 17 00:00:00 2001 From: bidi Date: Thu, 19 Nov 2026 16:04:47 +0200 Subject: [PATCH] updated config - database, second level cache Signed-off-by: bidi --- config/autoload/local.php.dist | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index e44ed3f6..2cbf53c5 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -18,6 +18,7 @@ $databases = [ * Only one active connection is allowed at a time. * By default, the application uses the 'mariadb' connection. * You can switch to another connection by activating it under doctrine->connection->orm_default-->params. + * Set 'persistent' to true to reuse database connections across requests (supported by pdo_mysql and pdo_pgsql). */ 'mariadb' => [ 'host' => 'localhost', @@ -26,16 +27,18 @@ $databases = [ 'password' => '', 'port' => 3306, 'driver' => 'pdo_mysql', + 'persistent' => false, 'collation' => 'utf8mb4_general_ci', 'table_prefix' => '', ], 'postgresql' => [ - 'host' => 'localhost', + 'host' => '127.0.0.1', 'dbname' => 'dotkernel', 'user' => '', 'password' => '', 'port' => 5432, 'driver' => 'pdo_pgsql', + 'persistent' => false, 'collation' => 'utf8mb4_general_ci', 'table_prefix' => '', ], @@ -49,12 +52,25 @@ return [ ], 'databases' => $databases, 'doctrine' => [ - 'connection' => [ + 'connection' => [ 'orm_default' => [ 'params' => $databases['mariadb'], // 'params' => $databases['postgresql'], ], ], + 'configuration' => [ + 'orm_default' => [ + /** + * Starting with doctrine/orm 3.8, the second-level cache requires + * the doctrine/orm-plugin-second-level-cache package. + * To enable it, run `composer require doctrine/orm-plugin-second-level-cache` + * and set 'enabled' to true. + */ + 'second_level_cache' => [ + 'enabled' => false, + ], + ], + ], ], 'routes' => [ 'page' => [