aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cgit.c b/cgit.c
index 11dff76..d9a03c2 100644
--- a/cgit.c
+++ b/cgit.c
@@ -26,13 +26,15 @@ static int cgit_prepare_cache(struct cacheitem *item)
26 } 26 }
27 27
28 if (!cgit_cmd) { 28 if (!cgit_cmd) {
29 item->name = xstrdup(fmt("%s/%s/index.html", cgit_cache_root, 29 item->name = xstrdup(fmt("%s/%s/index.%s.html", cgit_cache_root,
30 cache_safe_filename(cgit_repo->url))); 30 cache_safe_filename(cgit_repo->url),
31 cache_safe_filename(cgit_querystring)));
31 item->ttl = cgit_cache_repo_ttl; 32 item->ttl = cgit_cache_repo_ttl;
32 } else { 33 } else {
33 item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root, 34 item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root,
34 cache_safe_filename(cgit_repo->url), cgit_query_page, 35 cache_safe_filename(cgit_repo->url),
35 cache_safe_filename(cgit_querystring))); 36 cgit_query_page,
37 cache_safe_filename(cgit_querystring)));
36 if (cgit_query_has_symref) 38 if (cgit_query_has_symref)
37 item->ttl = cgit_cache_dynamic_ttl; 39 item->ttl = cgit_cache_dynamic_ttl;
38 else if (cgit_query_has_sha1) 40 else if (cgit_query_has_sha1)