diff --git a/apps/dav/lib/Connector/Sabre/CachingTree.php b/apps/dav/lib/Connector/Sabre/CachingTree.php
index 2d68025e3fa270f843ff7cd6fd8654238cd8e74b..e65b0d3b4d1cfda0a58210674185335c3248de19 100644
--- a/apps/dav/lib/Connector/Sabre/CachingTree.php
+++ b/apps/dav/lib/Connector/Sabre/CachingTree.php
@@ -38,4 +38,16 @@ class CachingTree extends Tree {
 		}
 		$this->cache[trim($path, '/')] = $node;
 	}
+
+	public function markDirty($path) {
+		// We don't care enough about sub-paths
+		// flushing the entire cache
+		$path = trim($path, '/');
+		foreach ($this->cache as $nodePath => $node) {
+			$nodePath = (string) $nodePath;
+			if ('' === $path || $nodePath == $path || 0 === strpos($nodePath, $path.'/')) {
+				unset($this->cache[$nodePath]);
+			}
+		}
+	}
 }