diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-02-17 19:14:46 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-02-17 19:14:46 +0100 |
commit | f309bc960de326c75548abcb18378a4b6e6348c2 (patch) | |
tree | 7683abd9ecf398caa1dd8afa52ed640dc75ab40f /lib | |
parent | 4422f9c9ef755ef44385a2ed9e0c42f7d1c459d5 (diff) | |
download | nextcloud-server-f309bc960de326c75548abcb18378a4b6e6348c2.tar.gz nextcloud-server-f309bc960de326c75548abcb18378a4b6e6348c2.zip |
cache result for getowner
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/storage/common.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 3d5898dcd80..156b49d4e82 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -383,7 +383,13 @@ abstract class Common implements Storage, ILockingStorage { * @return string|false uid or false */ public function getOwner($path) { - return \OC_User::getUser(); + static $owner; + + if (!isset($owner)) { + $owner = \OC_User::getUser();; + } + + return $owner; } /** |