]> git.cameronkatri.com Git - cgit.git/commitdiff
Fix search in repo index even if caching is enabled
authorLars Hjemli <hjemli@gmail.com>
Mon, 14 Apr 2008 21:07:52 +0000 (23:07 +0200)
committerLars Hjemli <hjemli@gmail.com>
Mon, 14 Apr 2008 21:07:52 +0000 (23:07 +0200)
The repository index page needed to include the querystring in the cache
filename.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.c

diff --git a/cgit.c b/cgit.c
index 6ec763fc670d04af532eaa4570b474533d02081a..38b0ba5d0616d29f291a9017ec59cac5522cf4ff 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -179,7 +179,9 @@ static int cgit_prepare_cache(struct cacheitem *item)
        }
 
        if (!ctx.repo) {
-               item->name = xstrdup(fmt("%s/index.html", ctx.cfg.cache_root));
+               item->name = xstrdup(fmt("%s/index.%s.html",
+                                        ctx.cfg.cache_root,
+                                        cache_safe_filename(ctx.qry.raw)));
                item->ttl = ctx.cfg.cache_root_ttl;
                return 1;
        }