From da44ccbf1827a2ed55c6843fb257bd9f55c6addf Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 9 Aug 2007 16:15:57 +0000 Subject: [PATCH] experimental code for hot restart of proxy cache (ITS#5081) --- doc/man/man5/slapo-pcache.5 | 7 + servers/slapd/overlays/pcache.c | 481 ++++++++++++++++++++++++++++++-- 2 files changed, 464 insertions(+), 24 deletions(-) diff --git a/doc/man/man5/slapo-pcache.5 b/doc/man/man5/slapo-pcache.5 index f2541f06f7..525a135800 100644 --- a/doc/man/man5/slapo-pcache.5 +++ b/doc/man/man5/slapo-pcache.5 @@ -67,10 +67,17 @@ returned is less than . Consistency check is performed every .RS proxycache \fBbdb 10000 1 50 100\fP .RE + .TP .B proxycachequeries Specify the maximum number of queries to cache. The default is 10000. +.TP +.B proxysavequeries { TRUE | FALSE } +Specify whether the cached queries should be saved across restarts +of the caching proxy, to provide hot startup of the cache. Only non-expired +queries are reloaded. The default is FALSE. + .TP .B proxyattrset Used to associate a set of attributes with an . Each attribute diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index d7001241bd..df434e7679 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -67,6 +67,23 @@ typedef struct cached_query_s { struct cached_query_s *lru_down; /* next query in the LRU list */ } CachedQuery; +/* + * URL representation: + * + * ldap:///????x-uuid=,x-template=