Roel van Meer wrote:
Hi list!
I've been figuring out how to get the pcache overlay to work, but I'm stuck with one thing: caching of DNs.
Take this example config:
overlay pcache pcache bdb 10000 2 500 100 directory /var/lib/ldap/cache
pcacheAttrset 0 * pcacheAttrset 1 uid
pcacheTemplate (uid=) 0 300 pcacheTemplate (uid=) 1 300
This works for queries like:
ldapsearch "uid=foo" '*'
or
ldapsearch "uid=foo" 'uid'
but NOT for:
ldapsearch "uid=foo" 'dn'
Can anyone tell me if it is at all possible to use pcache for caching DNs?
Things I have tried so far:
- adding 'dn' as a pcacheAttrset, but then slapd fails to start with the error "line 63: attribute type undefined".
That should have told you already, you're barking up the wrong tree. DN is not an attribute.
- adding 'distinguishedName' as a pcacheAttrset, and then the result is cached when I request the distinguishedName attribute, but not when the dn is requested.
I've tried openldap 2.4.40 and 2.4.44 (specifically, the version from Debian jessie and the version from jessie-backports).
Thanks a lot,
Roel
Howard Chu writes:
I've been figuring out how to get the pcache overlay to work, but I'm stuck with one thing: caching of DNs.
[snip]
Can anyone tell me if it is at all possible to use pcache for caching DNs?
It seems specifying "1.1" as value to pcacheAttrset seems to work for caching DNs.
Things I have tried so far:
- adding 'dn' as a pcacheAttrset, but then slapd fails to start with the error "line 63: attribute type undefined".
That should have told you already, you're barking up the wrong tree. DN is not an attribute.
Well yes, that was pretty obvious. I was just trying stuff in an attempt to make it work.
Regards,
Roel
openldap-technical@openldap.org