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

New Proxy cache overlay



I've just committed a rewrite of the proxy cache code, restructuring it as an
overlay and plugging a bunch of memory leaks along the way. I intend to
remove the proxycache support from slapd & back-meta Real Soon.

I've changed the config syntax a little bit. The overlay automatically
attaches a database backend underneath the proxy. Since the two backends are
coexisting like this, you no longer need the cacheRewrite parts of the
rewrite engine.

I've also removed the "queryid" attribute from the system schema. The overlay
adds it to the schema at runtime now. (This change to slap.h etc is not yet
committed. It needs to be before you can compile/run the overlay though.)

I haven't re-implemented the cache consistency check yet, will use the
runqueue support for that.

Here's the config I use now for test020, which passes this test. Compare with
the current tests/data/slapd-proxycache.conf...
####
moduleload ../servers/slapd/overlays/pcache.la

#######################################################################
# database definitions
#######################################################################

database        ldap
suffix          "o=University of Michigan,c=US"
uri             ldap://127.0.0.1:9011

overlay proxycache
proxycache      bdb 100 2 10 60
proxyattrset 0          sn cn title uid
proxyattrset 1          mail postaladdress telephonenumber cn uid
proxytemplate           (|(cn=)(sn=)) 0 60
proxytemplate           (sn=) 0 60
proxytemplate           (uid=) 1 60
proxytemplate           (mail=) 0 60

cachesize 20
directory ./testrun/db.2.a
index           objectClass     eq
index           cn,sn,uid,mail  pres,eq,sub

I suppose I'm going to have to make a real makefile for the overlays
directory now, and do something about enabling its builds in the configure
script.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support