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>
このコミットが含まれているのは:
Jason A. Donenfeld 2013-05-28 16:43:02 +02:00
コミット 00e3a3ecda

6
cgit.c
ファイルの表示

@ -928,12 +928,12 @@ static int calc_ttl()
if (!strcmp(ctx.qry.page, "about")) if (!strcmp(ctx.qry.page, "about"))
return ctx.cfg.cache_about_ttl; return ctx.cfg.cache_about_ttl;
if (ctx.qry.has_symref)
return ctx.cfg.cache_dynamic_ttl;
if (ctx.qry.has_sha1) if (ctx.qry.has_sha1)
return ctx.cfg.cache_static_ttl; return ctx.cfg.cache_static_ttl;
if (ctx.qry.has_symref)
return ctx.cfg.cache_dynamic_ttl;
return ctx.cfg.cache_repo_ttl; return ctx.cfg.cache_repo_ttl;
} }