diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-11-03 17:09:04 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-11-03 17:09:04 +0300 |
commit | 0825c58337d3fd8f766eaf0a77961bbe3ec09c35 (patch) | |
tree | 8161a49467900c6d8a580edde7519ae0f3a76535 /src/kvstorage.h | |
parent | 5419087e8314be3e96bce4a7cdc0ad1c506d09f2 (diff) | |
download | rspamd-0825c58337d3fd8f766eaf0a77961bbe3ec09c35.tar.gz rspamd-0825c58337d3fd8f766eaf0a77961bbe3ec09c35.zip |
Do not free elements that are still in cache.
Diffstat (limited to 'src/kvstorage.h')
-rw-r--r-- | src/kvstorage.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kvstorage.h b/src/kvstorage.h index ffff000db..fb5848274 100644 --- a/src/kvstorage.h +++ b/src/kvstorage.h @@ -38,6 +38,7 @@ typedef struct rspamd_kv_element* (*cache_insert)(struct rspamd_kv_cache *cache, typedef gboolean (*cache_replace)(struct rspamd_kv_cache *cache, gpointer key, struct rspamd_kv_element *elt); typedef struct rspamd_kv_element* (*cache_lookup)(struct rspamd_kv_cache *cache, gpointer key); typedef struct rspamd_kv_element* (*cache_delete)(struct rspamd_kv_cache *cache, gpointer key); +typedef void (*cache_steal)(struct rspamd_kv_cache *cache, struct rspamd_kv_element* elt); typedef void (*cache_destroy)(struct rspamd_kv_cache *cache); /* Callbacks for backend */ @@ -89,6 +90,7 @@ struct rspamd_kv_cache { cache_replace replace_func; /*< this callback is called when element is replace */ cache_lookup lookup_func; /*< this callback is used for lookup of element */ cache_delete delete_func; /*< this callback is called when an element is deleted */ + cache_steal steal_func; /*< this callback is used to replace duplicates in cache */ cache_destroy destroy_func; /*< this callback is used for destroying all elements inside cache */ }; struct rspamd_kv_backend { |