]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add more logging for DKIM keys caching
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Apr 2019 18:40:08 +0000 (19:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Apr 2019 18:40:08 +0000 (19:40 +0100)
src/plugins/dkim_check.c

index f7600552b965607c3dea6181fc2a189b8bc8d746..9861d1eb7e66f3993a8a2efd8d0f4c4378dfa52d 100644 (file)
@@ -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 */