- rc = entry_schema_check( be, e, save_attrs, text, textbuf, textlen );
+#ifndef LDAP_CACHING
+ rc = entry_schema_check( op->o_bd, e, save_attrs, text, textbuf, textlen );
+#else /* LDAP_CACHING */
+ if ( !op->o_caching_on ) {
+ rc = entry_schema_check( op->o_bd, e, save_attrs,
+ text, textbuf, textlen );
+ } else {
+ rc = LDAP_SUCCESS;
+ }
+#endif /* LDAP_CACHING */
+