summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-08-25 15:49:18 +0200
committerRobin Appelman <robin@icewind.nl>2016-08-25 17:22:25 +0200
commitb2d365734a692c6e09a07d0190fdabf64f3a295a (patch)
tree01e4f17ea59afdec4e95239f210e437b9e3d7c67 /lib
parent7c4d9add0d98091d8dc932553f84f9c00a906389 (diff)
downloadnextcloud-server-b2d365734a692c6e09a07d0190fdabf64f3a295a.tar.gz
nextcloud-server-b2d365734a692c6e09a07d0190fdabf64f3a295a.zip
cache root id in mountpoint
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Mount/MountPoint.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php
index 4aef340149c..42b79596c98 100644
--- a/lib/private/Files/Mount/MountPoint.php
+++ b/lib/private/Files/Mount/MountPoint.php
@@ -41,6 +41,7 @@ class MountPoint implements IMountPoint {
protected $storage = null;
protected $class;
protected $storageId;
+ protected $rootId = null;
/**
* Configuration options for the storage backend
@@ -264,7 +265,10 @@ class MountPoint implements IMountPoint {
* @return int
*/
public function getStorageRootId() {
- return (int)$this->getStorage()->getCache()->getId('');
+ if (is_null($this->rootId)) {
+ $this->rootId = (int)$this->getStorage()->getCache()->getId('');
+ }
+ return $this->rootId;
}
public function getMountId() {