aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/hash.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-20 09:48:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-20 09:48:20 +0100
commitbc5cf4c2403854857c61025b8a19ab5abb2e28df (patch)
tree6ec1d68ab00a1dd22a4b4ee444933c5a2ab7fb50 /src/libutil/hash.h
parentb0274f052131b83aa326d1fae717d54dce8b7229 (diff)
downloadrspamd-bc5cf4c2403854857c61025b8a19ab5abb2e28df.tar.gz
rspamd-bc5cf4c2403854857c61025b8a19ab5abb2e28df.zip
[Minor] Allow explicit deletion from LRU cache
Diffstat (limited to 'src/libutil/hash.h')
-rw-r--r--src/libutil/hash.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/hash.h b/src/libutil/hash.h
index 80bdf8ae3..7638d6397 100644
--- a/src/libutil/hash.h
+++ b/src/libutil/hash.h
@@ -53,6 +53,15 @@ rspamd_lru_hash_t * rspamd_lru_hash_new_full (
gpointer rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash,
gconstpointer key,
time_t now);
+
+/**
+ * Removes key from LRU cache
+ * @param hash
+ * @param key
+ * @return TRUE if key has been found and removed
+ */
+gboolean rspamd_lru_hash_remove (rspamd_lru_hash_t *hash,
+ gconstpointer key);
/**
* Insert item in hash
* @param hash hash object