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()
6262 *
6363 * @return bool true if yes, false if no
6464 */
65- public function exists ()
65+ public function exists ($ ignorecache = false )
6666 {
67+ if (!$ ignorecache ) {
68+ $ cached_pi_groups = $ this ->REDIS ->getCache ("sorted_pi_groups " , "" );
69+ return in_array ($ this ->getPIUID (), $ cached_pi_groups );
70+ }
6771 return $ this ->getLDAPPiGroup ()->exists ();
6872 }
6973
Original file line number Diff line number Diff line change @@ -154,8 +154,14 @@ public function getLDAPGroup()
154154 return $ this ->LDAP ->getGroupEntry ($ this ->uid );
155155 }
156156
157- public function exists ()
157+ public function exists ($ ignorecache = false )
158158 {
159+ if (!$ ignorecache ) {
160+ $ cached_val = $ this ->REDIS ->getCache ($ this ->uid , "cn " );
161+ if (!is_null ($ cached_val )) {
162+ return true ;
163+ }
164+ }
159165 return $ this ->getLDAPUser ()->exists () && $ this ->getLDAPGroup ()->exists ();
160166 }
161167
You can’t perform that action at this time.
0 commit comments