File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,12 @@ public function getPIUID()
62
62
*
63
63
* @return bool true if yes, false if no
64
64
*/
65
- public function exists ()
65
+ public function exists ($ ignorecache = false )
66
66
{
67
+ if (!$ ignorecache ) {
68
+ $ cached_pi_groups = $ this ->REDIS ->getCache ("sorted_pi_groups " , "" );
69
+ return in_array ($ this ->getPIUID (), $ cached_pi_groups );
70
+ }
67
71
return $ this ->getLDAPPiGroup ()->exists ();
68
72
}
69
73
Original file line number Diff line number Diff line change @@ -154,8 +154,14 @@ public function getLDAPGroup()
154
154
return $ this ->LDAP ->getGroupEntry ($ this ->uid );
155
155
}
156
156
157
- public function exists ()
157
+ public function exists ($ ignorecache = false )
158
158
{
159
+ if (!$ ignorecache ) {
160
+ $ cached_val = $ this ->REDIS ->getCache ($ this ->uid , "cn " );
161
+ if (!is_null ($ cached_val )) {
162
+ return true ;
163
+ }
164
+ }
159
165
return $ this ->getLDAPUser ()->exists () && $ this ->getLDAPGroup ()->exists ();
160
166
}
161
167
You can’t perform that action at this time.
0 commit comments