diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2024-05-10 20:48:53 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2024-05-10 20:48:53 +0000 |
| commit | c2a80056864d6eda0398fd127dc0ae515b39752b (patch) | |
| tree | 92e6196ae61df0fa7e4db654f78dfd837cc41826 /cachedb/cachedb.h | |
| parent | 5a33598e88ad8fbc0affa74dee0a2d8cc4010fbc (diff) | |
Diffstat (limited to 'cachedb/cachedb.h')
| -rw-r--r-- | cachedb/cachedb.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cachedb/cachedb.h b/cachedb/cachedb.h index 05c4368e60b4..2da8b5c71feb 100644 --- a/cachedb/cachedb.h +++ b/cachedb/cachedb.h @@ -41,6 +41,7 @@ */ #include "util/module.h" struct cachedb_backend; +struct module_stack; /** * The global variable environment contents for the cachedb @@ -110,3 +111,18 @@ size_t cachedb_get_mem(struct module_env* env, int id); */ struct module_func_block* cachedb_get_funcblock(void); +/** + * See if the cachedb is enabled. + * @param mods: module stack. It finds the cachedb module environment. + * @param env: module environment. + * @return true if exists and enabled. + */ +int cachedb_is_enabled(struct module_stack* mods, struct module_env* env); + +/** + * Remove a message from the global cache. Because edns subnet has a more + * specific entry, and if not removed when everything expires, the global + * entry is used, instead of a fresh lookup of the edns subnet entry. + * @param qstate: query state. + */ +void cachedb_msg_remove(struct module_qstate* qstate); |
