mirror of
https://github.com/nextcloud/server.git
synced 2026-05-26 11:22:28 -04:00
Merge pull request #41325 from nextcloud/backport/40995/stable26
[stable26] optimize cache jail creation
This commit is contained in:
commit
e794e7d733
2 changed files with 1 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue