[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5756) 2.4 slapo-pcache only caches first lookup for certain templates



toby@inf.ed.ac.uk wrote:
> Hi there, is there any further debugging I could usefully carry out  
> for this issue, or does it need someone who understands the code a bit  
> better?

It's not a debugging problem, but rather a design issue.  The current 
design makes use of the first AVA of the filter to decide how two 
filters are compared.  In your case, the first component is common to 
all filters, so only the first occurrence of a search with that template 
can be cached.  This fact, to my knowledge, is undocumented, but there's 
little to do except redesign this weighing criterium.  As I already 
pointed out, you need to make the most significant filter AVA appear 
first in your filter template.  Unless anyone voluteers for a complete 
redesign [*] of this portion of slapo-pcache(5), I take your ITS as a 
request to document this aspect of template design.

p.

[*] a complete redesign could also get rid of strict ordering of filter 
AVAs, allow "static" portions of the filter (something like 
(&(objectClass=person)(uid=)) and so) and other relatively unfriendly 
aspects of slapo-pcache(5) configuration.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------