cache root id in mountpoint

This commit is contained in:
Robin Appelman 2016-08-25 15:49:18 +02:00
parent 7c4d9add0d
commit b2d365734a

View File

@ -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() {