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

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

ando@sys-net.it wrote:
> 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.

The filter comparison function has been rewritten to compare all terms of the 
filter, instead of only the first. It now passes the simple cases from your 
previous followup. Please test...

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/