diff options
author | Robin Appelman <robin@icewind.nl> | 2023-11-09 15:30:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 15:30:43 +0100 |
commit | 6250c7d3a9a9e754f7e7c90afc0267f1d88cddfb (patch) | |
tree | 65cef1aeeaa185e40bffe024d5ab186ed6aa48b2 | |
parent | 11ec6a72a0c9447b6c5c7635997979f1cf2b1c22 (diff) | |
parent | 204aedc606ab53d3d4b2beb70dd6e72043b1f98b (diff) | |
download | nextcloud-server-6250c7d3a9a9e754f7e7c90afc0267f1d88cddfb.tar.gz nextcloud-server-6250c7d3a9a9e754f7e7c90afc0267f1d88cddfb.zip |
Merge pull request #41324 from nextcloud/backport/40995/stable27
[stable27] optimize cache jail creation
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 5 |
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 c4446473833..6ad753f3b39 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 caf039d4cca..a7f051ebd64 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); } |