summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-11-03 17:03:09 +0100
committerGitHub <noreply@github.com>2023-11-03 17:03:09 +0100
commit333ab4de68706205c955ca82f1e58d80a7c6d8c3 (patch)
tree30ed99da68c7ec23c6e45121b73e202ce2e5c21c /lib
parent86e9fcab21e8b4afc44f3b3597ac2f10e703fe1b (diff)
parent460344336e283d6ebca4066a3a876ca4843600bd (diff)
downloadnextcloud-server-333ab4de68706205c955ca82f1e58d80a7c6d8c3.tar.gz
nextcloud-server-333ab4de68706205c955ca82f1e58d80a7c6d8c3.zip
Merge pull request #40995 from nextcloud/cache-jail-optimizations
optimize cache jail creation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php5
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index d8cf3eb61d7..73c9a017019 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -52,8 +52,6 @@ class CacheJail extends CacheWrapper {
public function __construct($cache, $root) {
parent::__construct($cache);
$this->root = $root;
- $this->connection = \OC::$server->getDatabaseConnection();
- $this->mimetypeLoader = \OC::$server->getMimeTypeLoader();
if ($cache instanceof CacheJail) {
$this->unjailedRoot = $cache->getSourcePath($root);
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 1921ac27848..592acd418ec 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -396,10 +396,7 @@ class Jail extends Wrapper {
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
- if (!$storage) {
- $storage = $this->getWrapperStorage();
- }
- $sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path), $storage);
+ $sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path));
return new CacheJail($sourceCache, $this->rootPath);
}