summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-04-13 15:23:37 +0200
committerRoeland Jago Douma <rullzer@owncloud.com>2016-04-19 14:04:00 +0200
commit3f95d44ed149001f928806274cdbffb9718dca07 (patch)
tree7566749f929ffc6f7307da98e5ee47e58c2db21b /lib/private/files
parent7186975e35d03312f46b27d808a98f7bc6064078 (diff)
downloadnextcloud-server-3f95d44ed149001f928806274cdbffb9718dca07.tar.gz
nextcloud-server-3f95d44ed149001f928806274cdbffb9718dca07.zip
cache the scanner/updater/cache in the wrapper storage
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/storage/common.php24
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php6
2 files changed, 18 insertions, 12 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 85c2e1c6700..3a811b312c6 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -313,20 +313,20 @@ abstract class Common implements Storage, ILockingStorage {
if (!$storage) {
$storage = $this;
}
- if (!isset($this->cache)) {
- $this->cache = new Cache($storage);
+ if (!isset($storage->cache)) {
+ $storage->cache = new Cache($storage);
}
- return $this->cache;
+ return $storage->cache;
}
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
}
- if (!isset($this->scanner)) {
- $this->scanner = new Scanner($storage);
+ if (!isset($storage->scanner)) {
+ $storage->scanner = new Scanner($storage);
}
- return $this->scanner;
+ return $storage->scanner;
}
public function getWatcher($path = '', $storage = null) {
@@ -351,20 +351,20 @@ abstract class Common implements Storage, ILockingStorage {
if (!$storage) {
$storage = $this;
}
- if (!isset($this->propagator)) {
- $this->propagator = new Propagator($storage);
+ if (!isset($storage->propagator)) {
+ $storage->propagator = new Propagator($storage);
}
- return $this->propagator;
+ return $storage->propagator;
}
public function getUpdater($storage = null) {
if (!$storage) {
$storage = $this;
}
- if (!isset($this->updater)) {
- $this->updater = new Updater($storage);
+ if (!isset($storage->updater)) {
+ $storage->updater = new Updater($storage);
}
- return $this->updater;
+ return $storage->updater;
}
public function getStorageCache($storage = null) {
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index 12914e7a1b8..21d7db1099b 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -35,6 +35,12 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
*/
protected $storage;
+ public $cache;
+ public $scanner;
+ public $watcher;
+ public $propagator;
+ public $updater;
+
/**
* @param array $parameters
*/