From b025f07fb7090acfe9d168974b4ce2e66f973e30 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 25 Nov 2015 13:53:31 +0100 Subject: Make Cache\Updater per storage --- lib/private/files/storage/common.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/private/files/storage/common.php') diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 3772b442b59..0cd67e343ff 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -39,6 +39,7 @@ namespace OC\Files\Storage; use OC\Files\Cache\Cache; use OC\Files\Cache\Propagator; use OC\Files\Cache\Scanner; +use OC\Files\Cache\Updater; use OC\Files\Filesystem; use OC\Files\Cache\Watcher; use OCP\Files\FileNameTooLongException; @@ -67,6 +68,7 @@ abstract class Common implements Storage { protected $watcher; protected $propagator; protected $storageCache; + protected $updater; protected $mountOptions = []; @@ -363,6 +365,16 @@ abstract class Common implements Storage { return $this->propagator; } + public function getUpdater($storage = null) { + if (!$storage) { + $storage = $this; + } + if (!isset($this->updater)) { + $this->updater = new Updater($storage); + } + return $this->updater; + } + public function getStorageCache($storage = null) { if (!$storage) { $storage = $this; -- cgit v1.2.3