aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/common.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-25 12:49:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-25 12:49:54 +0100
commit50f6817ce99f3870e1e8dea92eaa35a0c40553ba (patch)
treeaf5dc3fbc1755312e2c8dbe28eab6b3a13d1693e /lib/private/files/storage/common.php
parent60682e17047df19c9486bfc21a993e08bbfce5ce (diff)
parenta95d4c2b22e2cf0deb4958bc3aa3b20ed9d0463c (diff)
downloadnextcloud-server-50f6817ce99f3870e1e8dea92eaa35a0c40553ba.tar.gz
nextcloud-server-50f6817ce99f3870e1e8dea92eaa35a0c40553ba.zip
Merge pull request #20439 from owncloud/etag-propagate-in-storage
Take submount etag into account for folder etags
Diffstat (limited to 'lib/private/files/storage/common.php')
-rw-r--r--lib/private/files/storage/common.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 8e4958a930d..3772b442b59 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -37,6 +37,7 @@
namespace OC\Files\Storage;
use OC\Files\Cache\Cache;
+use OC\Files\Cache\Propagator;
use OC\Files\Cache\Scanner;
use OC\Files\Filesystem;
use OC\Files\Cache\Watcher;
@@ -64,6 +65,7 @@ abstract class Common implements Storage {
protected $cache;
protected $scanner;
protected $watcher;
+ protected $propagator;
protected $storageCache;
protected $mountOptions = [];
@@ -345,6 +347,22 @@ abstract class Common implements Storage {
return $this->watcher;
}
+ /**
+ * get a propagator instance for the cache
+ *
+ * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
+ * @return \OC\Files\Cache\Propagator
+ */
+ public function getPropagator($storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ if (!isset($this->propagator)) {
+ $this->propagator = new Propagator($storage);
+ }
+ return $this->propagator;
+ }
+
public function getStorageCache($storage = null) {
if (!$storage) {
$storage = $this;