Merge pull request #22482 from owncloud/getowner-cache
cache result for getowner
This commit is contained in:
commit
2a9b0aaaa1
|
@ -72,6 +72,7 @@ abstract class Common implements Storage, ILockingStorage {
|
||||||
protected $updater;
|
protected $updater;
|
||||||
|
|
||||||
protected $mountOptions = [];
|
protected $mountOptions = [];
|
||||||
|
protected $owner = null;
|
||||||
|
|
||||||
public function __construct($parameters) {
|
public function __construct($parameters) {
|
||||||
}
|
}
|
||||||
|
@ -383,7 +384,11 @@ abstract class Common implements Storage, ILockingStorage {
|
||||||
* @return string|false uid or false
|
* @return string|false uid or false
|
||||||
*/
|
*/
|
||||||
public function getOwner($path) {
|
public function getOwner($path) {
|
||||||
return \OC_User::getUser();
|
if ($this->owner === null) {
|
||||||
|
$this->owner = \OC_User::getUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue