struct rspamd_symcache *cache,
const gchar *symbol);
+/**
+ * Disable execution of a symbol or a pattern (a string enclosed in `//`) permanently
+ * @param task
+ * @param cache
+ * @param symbol
+ * @return
+ */
+void rspamd_symcache_disable_symbol_static (struct rspamd_symcache *cache,
+ const gchar *symbol);
+/**
+ * Add a symbol or a pattern to the list of explicitly and statically enabled symbols
+ * @param cache
+ * @param symbol
+ * @return
+ */
+void rspamd_symcache_enable_symbol_static (struct rspamd_symcache *cache,
+ const gchar *symbol);
+
/**
* Process specific function for each cache element (in order they are added)
* @param cache
return cache_runtime->enable_symbol(task, *real_cache, symbol);
}
+void
+rspamd_symcache_disable_symbol_static (struct rspamd_symcache *cache,
+ const gchar *symbol)
+{
+ auto *real_cache = C_API_SYMCACHE(cache);
+
+ real_cache->disable_symbol_delayed(symbol);
+}
+
+void rspamd_symcache_enable_symbol_static (struct rspamd_symcache *cache,
+ const gchar *symbol)
+{
+ auto *real_cache = C_API_SYMCACHE(cache);
+
+ real_cache->enable_symbol_delayed(symbol);
+}
+
gboolean
rspamd_symcache_is_checked(struct rspamd_task *task,
struct rspamd_symcache *cache,