From e33310f26351e25fda718a353f8b8e9ece0007b5 Mon Sep 17 00:00:00 2001 From: frosty Date: Tue, 10 Mar 2026 03:40:34 -0400 Subject: feature: added caching --- src/Config.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Config.c') diff --git a/src/Config.c b/src/Config.c index ff57dd7..d038525 100644 --- a/src/Config.c +++ b/src/Config.c @@ -80,6 +80,15 @@ int load_config(const char *filename, Config *config) { } else if (strcmp(key, "randomize_password") == 0) { config->randomize_password = atoi(value); } + } else if (strcmp(section, "cache") == 0) { + if (strcmp(key, "dir") == 0) { + strncpy(config->cache_dir, value, sizeof(config->cache_dir) - 1); + config->cache_dir[sizeof(config->cache_dir) - 1] = '\0'; + } else if (strcmp(key, "ttl_search") == 0) { + config->cache_ttl_search = atoi(value); + } else if (strcmp(key, "ttl_infobox") == 0) { + config->cache_ttl_infobox = atoi(value); + } } } } -- cgit v1.2.3