The Memcached class of bda.cache is not thread aware. This means that each time the cacheProviderFactory is called, a new connection is established to the memcached. For large LDAP directories, this leads to countless connections that waste system resources and increase the latency of the cache mechanism. This PR fixes the problem. Only one memcachd connection is established per zope thread and can be reused per request by the cacheProviderFactory.
The Memcached class of bda.cache is not thread aware. This means that each time the cacheProviderFactory is called, a new connection is established to the memcached. For large LDAP directories, this leads to countless connections that waste system resources and increase the latency of the cache mechanism. This PR fixes the problem. Only one memcachd connection is established per zope thread and can be reused per request by the cacheProviderFactory.