summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 7e4de95..886c9a4 100644
--- a/src/database.c
+++ b/src/database.c
@@ -93,3 +93,17 @@ void db_destroy(void)
pthread_mutex_unlock(&database_mutex);
}
+
+void db_invalidate_cached_results(void)
+{
+ size_t i;
+ db_entry *entry;
+
+ pthread_mutex_lock(&database_mutex);
+
+ for (i = 0; i < HASH_MAX; i++)
+ eli_for(entry, database[i], ht_chain)
+ entry->cached_result_valid = false;
+
+ pthread_mutex_unlock(&database_mutex);
+}