diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-04-23 01:00:27 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-04-23 01:00:27 +0200 |
commit | b066c0ff4480c3054630cdd846eda0043ee41d52 (patch) | |
tree | 3593c4c4c3ec2239e5a60c64aa7431239493b382 /apps/user_ldap/group_proxy.php | |
parent | edd37c779d6e6ef79589912c85f382138ff54a7a (diff) | |
download | nextcloud-server-b066c0ff4480c3054630cdd846eda0043ee41d52.tar.gz nextcloud-server-b066c0ff4480c3054630cdd846eda0043ee41d52.zip |
LDAP: reset user/group-config association only after exists-check, may performance in some cases
Diffstat (limited to 'apps/user_ldap/group_proxy.php')
-rw-r--r-- | apps/user_ldap/group_proxy.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/user_ldap/group_proxy.php b/apps/user_ldap/group_proxy.php index 68d2efe3871..75e7cd46336 100644 --- a/apps/user_ldap/group_proxy.php +++ b/apps/user_ldap/group_proxy.php @@ -76,8 +76,15 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface { if(isset($this->backends[$prefix])) { $result = call_user_func_array(array($this->backends[$prefix], $method), $parameters); if(!$result) { - //not found here, reset cache to null - $this->writeToCache($cacheKey, null); + //not found here, reset cache to null if group vanished + //because sometimes methods return false with a reason + $groupExists = call_user_func_array( + array($this->backends[$prefix], 'groupExists'), + array($gid) + ); + if(!$groupExists) { + $this->writeToCache($cacheKey, null); + } } return $result; } |