cache numeric id in mountpoint

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2023-02-06 18:20:08 +01:00
parent 9281359fa4
commit e3bafcc7a8

View file

@ -44,6 +44,7 @@ class MountPoint implements IMountPoint {
protected $storage = null;
protected $class;
protected $storageId;
protected $numericStorageId = null;
protected $rootId = null;
/**
@ -211,7 +212,10 @@ class MountPoint implements IMountPoint {
* @return int
*/
public function getNumericStorageId() {
return $this->getStorage()->getStorageCache()->getNumericId();
if (is_null($this->numericStorageId)) {
$this->numericStorageId = $this->getStorage()->getStorageCache()->getNumericId();
}
return $this->numericStorageId;
}
/**