changeset 12297:b0ef4e803b1a

auth: Log userdb cache hits and misses with auth_debug=yes
author Timo Sirainen <tss@iki.fi>
date Mon, 18 Oct 2010 15:35:24 +0100
parents 953e7c6e546b
children 94608c2debe2
files src/auth/auth-request.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-request.c	Mon Oct 18 15:07:02 2010 +0100
+++ b/src/auth/auth-request.c	Mon Oct 18 15:35:24 2010 +0100
@@ -733,8 +733,12 @@
 
 	value = auth_cache_lookup(passdb_cache, request, key, &node,
 				  &expired, &neg_expired);
-	if (value == NULL || (expired && !use_expired))
+	if (value == NULL || (expired && !use_expired)) {
+		auth_request_log_debug(request, "userdb-cache",
+				       value == NULL ? "miss" : "expired");
 		return FALSE;
+	}
+	auth_request_log_debug(request, "userdb-cache", "hit: %s", value);
 
 	if (*value == '\0') {
 		/* negative cache entry */