Got it. In fact, it seem that the implementation of pcache on CentOS is just not working. A lot of strange behaviors. I did reinstall on Ubuntu 14.04 LTS, and it started working. One thing, though. It seems that some attributes don't get cached, despite the fact that they are in the pcacheAttrset referenced. Maybe because I'm using rwm as well to map some attributes? Then, which fields should be in the pcacheAttrset? The original attribute or the mapped one ? For example, I'm mapping sAMAccountName to uid, and it tells me that uid is not in the cache.
Tks,
---
CHRISTIAN -------------------------
On 2015-10-14 00:51, Dieter Klünter wrote:
Am Tue, 13 Oct 2015 11:26:02 -0400 schrieb Christian Tardif christian.tardif@servinfo.ca:
Hi, I've been trying to setup a caching proxy server with OpenLDAP for quite a long time, and it seems, from what I can see right now, that the proxy stuff is working (I can log on on a server that points to the proxy as its LDAP server), but the caching stuff doesn't seem to work at all. EVERY request I'm doing is transferred to the AD (the real LDAP server) behind the proxy LDAP. Here's how my pcache module is set. Not too sure though, how to setup pcacheTemplates. Maybe that my error. One thing to note is that no database is even created in /var/tmp/cache directory, as I would expect. moduleload pcache.la overlay pcache pcache bdb 100000 3 1000 60 directory /var/tmp/cache cachesize 150 index objectClass eq index sAMAccountName eq pcacheMaxQueries 100 pcacheAttrset 0 objectClass name objectSid pcacheAttrset 1 objectClass sAMAccountName pcacheAttrset 2 * pcacheTemplate (&(member=)(objectClass=)(name=)) 0 60 pcacheTemplate (objectClass=) 0 60 pcacheTemplate
(&(objectSid=)(objectClass=)(name=)) 0 60 pcacheTemplate (&(?sAMAccountName=)(?objectClass=)(sAMAccountName=)(objectSid=)) 2 60 pcacheTemplate (sAMAccountName=) 2 60 pcachePersist true
The pcache Template has to match the search filter and only the referenced attribute set is cached.
-Dieter