diff options
Diffstat (limited to 'src/kvstorage.h')
-rw-r--r-- | src/kvstorage.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kvstorage.h b/src/kvstorage.h index f970a7086..b99050583 100644 --- a/src/kvstorage.h +++ b/src/kvstorage.h @@ -65,7 +65,8 @@ enum rspamd_kv_flags { KV_ELT_DIRTY = 1 << 2, KV_ELT_OUSTED = 1 << 3, KV_ELT_NEED_FREE = 1 << 4, - KV_ELT_INTEGER = 1 << 5 + KV_ELT_INTEGER = 1 << 5, + KV_ELT_NEED_INSERT = 1 << 6 }; #define ELT_DATA(elt) (gchar *)(elt)->data + (elt)->keylen + 1 @@ -140,6 +141,10 @@ struct rspamd_kv_storage *rspamd_kv_storage_new (gint id, const gchar *name, /** Insert new element to the kv storage */ gboolean rspamd_kv_storage_insert (struct rspamd_kv_storage *storage, gpointer key, guint keylen, gpointer data, gsize len, gint flags, guint expire); +/** Insert element only in cache */ +gboolean rspamd_kv_storage_insert_cache (struct rspamd_kv_storage *storage, gpointer key, guint keylen, + gpointer data, gsize len, gint flags, guint expire, struct rspamd_kv_element **pelt); + /** Replace an element in the kv storage */ gboolean rspamd_kv_storage_replace (struct rspamd_kv_storage *storage, gpointer key, guint keylen, struct rspamd_kv_element *elt); |