diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-18 14:58:06 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-18 14:58:06 +0000 |
commit | 6cbad30ffbc13f9ce49e8a560f5d0fb27f4557d1 (patch) | |
tree | 8172360fcb3b675965543399057e88fc486248fc /src/hash.h | |
parent | 6eca77ce25118de6a6fe22a2f1c051bde8e754f5 (diff) | |
download | rspamd-6cbad30ffbc13f9ce49e8a560f5d0fb27f4557d1.tar.gz rspamd-6cbad30ffbc13f9ce49e8a560f5d0fb27f4557d1.zip |
Rework LRU hash logic.
Diffstat (limited to 'src/hash.h')
-rw-r--r-- | src/hash.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hash.h b/src/hash.h index fc336b6bb..adc9d2823 100644 --- a/src/hash.h +++ b/src/hash.h @@ -50,7 +50,9 @@ typedef struct rspamd_lru_element_s { gpointer data; gpointer key; time_t store_time; + guint ttl; rspamd_lru_hash_t *hash; + GList *link; } rspamd_lru_element_t; @@ -141,7 +143,8 @@ gpointer rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, gpointer key, time_t n * @param key key to insert * @param value value of key */ -void rspamd_lru_hash_insert (rspamd_lru_hash_t *hash, gpointer key, gpointer value, time_t now); +void rspamd_lru_hash_insert (rspamd_lru_hash_t *hash, gpointer key, gpointer value, + time_t now, guint ttl); /** * Remove lru hash |