Merge pull request #22482 from owncloud/getowner-cache

cache result for getowner
This commit is contained in:
Thomas Müller 2016-02-18 16:45:40 +01:00
commit 2a9b0aaaa1
1 changed files with 6 additions and 1 deletions

View File

@ -72,6 +72,7 @@ abstract class Common implements Storage, ILockingStorage {
protected $updater;
protected $mountOptions = [];
protected $owner = null;
public function __construct($parameters) {
}
@ -383,7 +384,11 @@ abstract class Common implements Storage, ILockingStorage {
* @return string|false uid or false
*/
public function getOwner($path) {
return \OC_User::getUser();
if ($this->owner === null) {
$this->owner = \OC_User::getUser();
}
return $this->owner;
}
/**