summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04644b2)
raw | patch | inline | side by side (parent: 04644b2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 08:16:15 +0000 (08:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 08:16:15 +0000 (08:16 +0000) |
-Cache the result of get_objectclasses. It took 13seconds when deleting ~20 FAI objects.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9003 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9003 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history |
index 61ecc9d8a66d4f2f9fc8bd949b950ae8b8dc24f4..642908017b553e236a8ca00710cc2dc60961ec5f 100644 (file)
return($objectclasses);
}
}
+
+ /* Return the cached results. */
+ if(class_available('session') && session::is_set("LDAP_CACHE::get_objectclasses")){
+ $objectclasses = session::get("LDAP_CACHE::get_objectclasses");
+ return($objectclasses);
+ }
# Get base to look for schema
$sr = @ldap_read ($this->cid, NULL, "objectClass=*", array("subschemaSubentry"));
}
}
+ if(class_available("session")){
+ session::set("LDAP_CACHE::get_objectclasses",$objectclasses);
+ }
return $objectclasses;
}