about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-05-28 16:43:02 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2013-08-12 13:14:10 -0600
commit00e3a3ecda77bf5ab149db0940c549f1bb618de4 (patch)
tree887b4fec5fa60945dc4d0c6919efbbbe4ef7216c
parentcache: document negative ttls and add about ttl (diff)
downloadcgit-pink-00e3a3ecda77bf5ab149db0940c549f1bb618de4.tar.gz
cgit-pink-00e3a3ecda77bf5ab149db0940c549f1bb618de4.zip
cache: id means static, even if head is specified too
Pages like /commit?h=wip&id=8a335ce618ba77fbf05148d6f8be17bd48ba4340
were being marked as dynamic, because of h=wip, when it should be
static, because of id=.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--cgit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgit.c b/cgit.c
index a45ce1f..861352a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -928,12 +928,12 @@ static int calc_ttl()
 	if (!strcmp(ctx.qry.page, "about"))
 		return ctx.cfg.cache_about_ttl;
 
-	if (ctx.qry.has_symref)
-		return ctx.cfg.cache_dynamic_ttl;
-
 	if (ctx.qry.has_sha1)
 		return ctx.cfg.cache_static_ttl;
 
+	if (ctx.qry.has_symref)
+		return ctx.cfg.cache_dynamic_ttl;
+
 	return ctx.cfg.cache_repo_ttl;
 }
 
ef='/src/commit/bin/hilex/mdoc.l?id=118a437acfb7b53d7522c71bd3f99982724b425b&follow=1'>Remove hacky tagging from hilexJune McEnroe 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe