LDAPAddRequest::~LDAPAddRequest(){
DEBUG(LDAP_DEBUG_DESTROY, "LDAPAddRequest::~LDAPAddRequest()" << endl);
delete m_entry;
- // flush the cache, as the add may affect searches
- m_connection->flush_cache();
}
LDAPMessageQueue* LDAPAddRequest::sendRequest(){
LDAPAsynConnection::~LDAPAsynConnection(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPAsynConnection::~LDAPAsynConnection()" << endl);
- if (cur_session){
- ldap_destroy_cache(cur_session);
- }
unbind();
//delete m_constr;
}
return 0;
}
-int LDAPAsynConnection::enableCache(long timeout, long maxmem){
- int retval = ldap_enable_cache(cur_session, timeout, maxmem);
- if (!retval)
- m_cacheEnabled = true;
- return retval;
-}
-
-void LDAPAsynConnection::disableCache(){
- ldap_disable_cache(cur_session);
- m_cacheEnabled = false;
-}
-
-void LDAPAsynConnection::uncache_entry(string &dn){
- if (m_cacheEnabled){
- ldap_uncache_entry(cur_session, dn.c_str());
- }
-}
-
-void LDAPAsynConnection::flush_cache(){
- if (m_cacheEnabled){
- ldap_flush_cache(cur_session);
- }
-}
LDAPUrlList::const_iterator& usedUrl,
const LDAPConstraints* cons) const;
- /**
- * Turn on caching, maxmem is in MB and timeout is in seconds.
- * maxmem can be zero if you want to restrict caching by timeout only.
- */
- int enableCache(long timeout, long maxmem);
- /// disable caching.
- void disableCache();
- /// is cacheEnabled?
- bool getCacheEnabled() { return m_cacheEnabled;};
- /// uncache a specific dn. Used internally by methods that write.
- void uncache_entry(std::string &dn);
- /// used to clear the cache. Probably should be used after creating
- /// an object that a cached search should find.
- void flush_cache();
-
-
private :
/**
* Private copy constructor. So nobody can call it.
const LDAPConstraints* LDAPConnection::getConstraints() const{
return LDAPAsynConnection::getConstraints();
}
-
-int LDAPConnection::enableCache(long timeout, long maxmem) {
- return LDAPAsynConnection::enableCache(timeout, maxmem);
-}
-
-
-void LDAPConnection::disableCache() {
- LDAPAsynConnection::disableCache();
-}
-
-bool LDAPConnection::getCacheEnabled() {
- return LDAPAsynConnection::getCacheEnabled();
-}
-
-void LDAPConnection::uncache_entry(string &dn) {
- LDAPAsynConnection::uncache_entry(dn);
-}
-
-void LDAPConnection::flush_cache()
-{
- LDAPAsynConnection::flush_cache();
-}
-
void setConstraints(LDAPConstraints *cons);
const LDAPConstraints* getConstraints() const ;
-
- /**
- * Turn on caching, maxmem is in MB and timeout is in seconds.
- * maxmem can be zero if you want to restrict caching by timeout only.
- */
- int enableCache(long timeout, long maxmem);
- /// disable caching.
- void disableCache();
- /// is cacheEnabled?
- bool getCacheEnabled();
- /// uncache a specific dn. Used internally by methods that write.
- void uncache_entry(std::string &dn);
- /// used to clear the cache. Probably should be used after creating
- /// an object that a cached search should find.
- void flush_cache();
-
};
#endif //LDAP_CONNECTION_H
LDAPDeleteRequest::~LDAPDeleteRequest(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPDeleteRequest::~LDAPDeleteRequest()" << endl);
- // TODO -- flush the entire cache here? or does this invalidate
- // cached searches that may have found the deleted entry.
- // m_connection->uncache_entry(m_dn);
- m_connection->flush_cache();
}
LDAPMessageQueue* LDAPDeleteRequest::sendRequest(){
LDAPModDNRequest::~LDAPModDNRequest(){
DEBUG(LDAP_DEBUG_DESTROY, "LDAPModDNRequest::~LDAPModDNRequest()" << endl);
- // flush entries from the cache.
- m_connection->uncache_entry(m_dn);
- m_connection->uncache_entry(m_newRDN);
}
LDAPMessageQueue* LDAPModDNRequest::sendRequest(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPModifyRequest::~LDAPModifyRequest()" << endl);
delete m_modList;
- // flush this entry from cache.
- //m_connection->uncache_entry(m_dn);
- // I think we need to do this... (j.costlow)
- m_connection->flush_cache();
}
LDAPMessageQueue* LDAPModifyRequest::sendRequest(){
-/* src/config.h.in. Generated automatically from configure.in by autoheader. */
+/* src/config.h.in. Generated from configure.in by autoheader. */
#undef WITH_DEBUG
-/* Define if you have the <dlfcn.h> header file. */
+/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define if you have the `resolv' library (-lresolv). */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
/* Name of package */
#undef PACKAGE
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */