[dovecot-cvs] dovecot/src/master auth-process.c, 1.66, 1.67 master-settings.c, 1.73, 1.74 master-settings.h, 1.48, 1.49

cras at dovecot.org cras at dovecot.org
Thu Oct 21 05:23:15 EEST 2004


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv21856/src/master

Modified Files:
	auth-process.c master-settings.c master-settings.h 
Log Message:
Added simple LRU cache for auth requests. Currently only for sql passdb.



Index: auth-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- auth-process.c	20 Oct 2004 17:49:02 -0000	1.66
+++ auth-process.c	21 Oct 2004 02:23:13 -0000	1.67
@@ -442,6 +442,8 @@
 			    group->set->username_translation, NULL));
 	env_put(t_strconcat("ANONYMOUS_USERNAME=",
 			    group->set->anonymous_username, NULL));
+	env_put(t_strdup_printf("CACHE_SIZE=%u", group->set->cache_size));
+	env_put(t_strdup_printf("CACHE_TTL=%u", group->set->cache_ttl));
 
 	for (as = group->set->sockets, i = 1; as != NULL; as = as->next, i++) {
 		if (strcmp(as->type, "listen") != 0)

Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- master-settings.c	11 Oct 2004 12:05:10 -0000	1.73
+++ master-settings.c	21 Oct 2004 02:23:13 -0000	1.74
@@ -139,6 +139,8 @@
 	DEF(SET_STR, default_realm),
 	DEF(SET_STR, userdb),
 	DEF(SET_STR, passdb),
+	DEF(SET_INT, cache_size),
+	DEF(SET_INT, cache_ttl),
 	DEF(SET_STR, executable),
 	DEF(SET_STR, user),
 	DEF(SET_STR, chroot),
@@ -310,6 +312,8 @@
 	MEMBER(default_realm) NULL,
 	MEMBER(userdb) "passwd",
 	MEMBER(passdb) "pam",
+	MEMBER(cache_size) 0,
+	MEMBER(cache_ttl) 3600,
 	MEMBER(executable) PKG_LIBEXECDIR"/dovecot-auth",
 	MEMBER(user) "root",
 	MEMBER(chroot) NULL,

Index: master-settings.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- master-settings.h	10 Oct 2004 17:25:45 -0000	1.48
+++ master-settings.h	21 Oct 2004 02:23:13 -0000	1.49
@@ -129,6 +129,8 @@
 	const char *default_realm;
 	const char *userdb;
 	const char *passdb;
+	unsigned int cache_size;
+	unsigned int cache_ttl;
 	const char *executable;
 	const char *user;
 	const char *chroot;



More information about the dovecot-cvs mailing list