commit b4b158a: [Minor] Add more logging for DKIM keys caching

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Apr 5 18:42:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-05 19:40:08 +0100
URL: https://github.com/rspamd/rspamd/commit/b4b158a4de88a2961bd62a3297c74f495a25de1a (HEAD -> master)

[Minor] Add more logging for DKIM keys caching

---
 src/plugins/dkim_check.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index f7600552b..9861d1eb7 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -1110,6 +1110,12 @@ dkim_module_key_handler (rspamd_dkim_key_t *key,
 		/* Release key when task is processed */
 		rspamd_mempool_add_destructor (res->task->task_pool,
 				dkim_module_key_dtor, res->key);
+		msg_info_task ("stored DKIM key for %s in LRU cache for %d seconds, "
+					   "%d/%d elements in the cache",
+				rspamd_dkim_get_dns_key (ctx),
+				rspamd_dkim_key_get_ttl (key),
+				rspamd_lru_hash_size (dkim_module_ctx->dkim_hash),
+				rspamd_lru_hash_capacity (dkim_module_ctx->dkim_hash));
 	}
 	else {
 		/* Insert tempfail symbol */


More information about the Commits mailing list