aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/common.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-10 16:14:08 +0100
committerRobin Appelman <icewind@owncloud.com>2015-11-19 13:32:00 +0100
commit888df3933df7f3588de11085035d2d3ae9292fb0 (patch)
treeb7976666e9249b0be163b57fb064f3a1ade26919 /lib/private/files/storage/common.php
parentd006a7c723e4c51a4132b0f8817392bf1f3cd534 (diff)
downloadnextcloud-server-888df3933df7f3588de11085035d2d3ae9292fb0.tar.gz
nextcloud-server-888df3933df7f3588de11085035d2d3ae9292fb0.zip
take the etag of child mounts into account for the folder etag
this replaces shared etag propagation
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 77a70226b37..a52e7c35f87 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;