diff --git a/lib/private/db.php b/lib/private/db.php index 221a369cad2..80163415a90 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -417,6 +417,7 @@ class OC_DB { * @param bool $enabled */ static public function enableCaching($enabled) { + self::connect(); if ($enabled) { self::$connection->enableQueryStatementCaching(); } else {