diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-03 17:10:34 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-03 17:10:34 +0000 |
commit | 45e84668a1c7a7131db53e2b94375cfc98d68556 (patch) | |
tree | 6f39b6fa4420d7476bff5c91a6c99998063358ec /src/libserver/re_cache.h | |
parent | b279f5c311ad4a454f9aef1f373d88bd2aed9b81 (diff) | |
download | rspamd-45e84668a1c7a7131db53e2b94375cfc98d68556.tar.gz rspamd-45e84668a1c7a7131db53e2b94375cfc98d68556.zip |
Start new era of regexp cache
Diffstat (limited to 'src/libserver/re_cache.h')
-rw-r--r-- | src/libserver/re_cache.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libserver/re_cache.h b/src/libserver/re_cache.h index ade0a1164..ae23fc89a 100644 --- a/src/libserver/re_cache.h +++ b/src/libserver/re_cache.h @@ -25,11 +25,11 @@ #define RSPAMD_RE_CACHE_H #include "config.h" -#include "libserver/task.h" #include "libutil/regexp.h" struct rspamd_re_cache; struct rspamd_re_runtime; +struct rspamd_task; enum rspamd_re_type { RSPAMD_RE_HEADER, @@ -91,8 +91,17 @@ gint rspamd_re_cache_process (struct rspamd_task *task, void rspamd_re_cache_runtime_destroy (struct rspamd_re_runtime *rt); /** - * Destroy re cache + * Unref re cache */ -void rspamd_re_cache_destroy (struct rspamd_re_cache *cache); +void rspamd_re_cache_unref (struct rspamd_re_cache *cache); +/** + * Retain reference to re cache + */ +struct rspamd_re_cache *rspamd_re_cache_ref (struct rspamd_re_cache *cache); + +/** + * Set limit for all regular expressions in the cache, returns previous limit + */ +guint rspamd_re_cache_set_limit (struct rspamd_re_cache *cache, guint limit); #endif |