diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-05-28 23:43:02 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-08-13 04:14:10 (JST) |
commit | 00e3a3ecda77bf5ab149db0940c549f1bb618de4 (patch) | |
tree | 887b4fec5fa60945dc4d0c6919efbbbe4ef7216c /cgit.c | |
parent | 61ff10065b579fa38182fcf10cc7e63839acd53c (diff) | |
download | cgit-00e3a3ecda77bf5ab149db0940c549f1bb618de4.zip cgit-00e3a3ecda77bf5ab149db0940c549f1bb618de4.tar.gz |
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>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -928,12 +928,12 @@ static int calc_ttl() | |||
928 | if (!strcmp(ctx.qry.page, "about")) | 928 | if (!strcmp(ctx.qry.page, "about")) |
929 | return ctx.cfg.cache_about_ttl; | 929 | return ctx.cfg.cache_about_ttl; |
930 | 930 | ||
931 | if (ctx.qry.has_symref) | ||
932 | return ctx.cfg.cache_dynamic_ttl; | ||
933 | |||
934 | if (ctx.qry.has_sha1) | 931 | if (ctx.qry.has_sha1) |
935 | return ctx.cfg.cache_static_ttl; | 932 | return ctx.cfg.cache_static_ttl; |
936 | 933 | ||
934 | if (ctx.qry.has_symref) | ||
935 | return ctx.cfg.cache_dynamic_ttl; | ||
936 | |||
937 | return ctx.cfg.cache_repo_ttl; | 937 | return ctx.cfg.cache_repo_ttl; |
938 | } | 938 | } |
939 | 939 | ||