Skip to content

Commit

Permalink
cache numeric id in mountpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Feb 6, 2023
1 parent 9281359 commit e3bafcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/Mount/MountPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MountPoint implements IMountPoint {
protected $storage = null;
protected $class;
protected $storageId;
protected $numericStorageId = null;
protected $rootId = null;

/**
Expand Down Expand Up @@ -211,7 +212,10 @@ public function getStorageId() {
* @return int
*/
public function getNumericStorageId() {
return $this->getStorage()->getStorageCache()->getNumericId();
if (is_null($this->numericStorageId)) {
$this->numericStorageId = $this->getStorage()->getStorageCache()->getNumericId();
}
return $this->numericStorageId;
}

/**
Expand Down

0 comments on commit e3bafcc

Please sign in to comment.