diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-03-10 03:40:34 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-03-10 03:40:34 -0400 |
| commit | e33310f26351e25fda718a353f8b8e9ece0007b5 (patch) | |
| tree | ac371b6c35bbdda348afbfcfd05ac5ee2c372ab7 /src/Config.c | |
| parent | a11bf8bb6c1baaef51c25d441f5348567280967b (diff) | |
| download | omnisearch-e33310f26351e25fda718a353f8b8e9ece0007b5.tar.gz | |
feature: added caching
Diffstat (limited to 'src/Config.c')
| -rw-r--r-- | src/Config.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); + } } } } |
