Diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/cgit.c | 3 |
1 file changed, 2 insertions, 1 deletion
diff --git a/source/cgit.c b/source/cgit.c index 254062f..41bbad3 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -452,8 +452,9 @@ static void process_cached_repolist(const char *path) config_file_parse(cached_rc.buf, apply_config); + // A negative ttl never expires, the same as for a cached page. age = time(NULL) - st.st_mtime; - if (age <= (ctx.cfg.cache_scan_ttl * 60)) + if (ctx.cfg.cache_scan_ttl < 0 || age <= (ctx.cfg.cache_scan_ttl * 60)) goto out; // The list just parsed is stale but usable, so a child rebuilds it |
