Rewrite Koji toplink URLs to improve cache hit ratio (#7383)

This commit is contained in:
Mikolaj Izdebski 2018-11-30 08:30:21 +00:00
parent fbbe871539
commit 33241e7f59
2 changed files with 10 additions and 0 deletions

View file

@ -66,5 +66,10 @@ sub vcl_recv {
if (req.url ~ "^/mass-rebuild/") {
return (pipe);
}
# Rewrite toplink URLs to improve cache hit ratio
# See: https://pagure.io/fedora-infrastructure/issue/7383
set req.url = regsub(req.url, "^/repos/[^/]+/[^/]+/[^/]+/toplink/", "/");
return (hash);
}

View file

@ -86,5 +86,10 @@ sub vcl_recv {
if (req.url ~ "h264") {
return (pipe);
}
# Rewrite toplink URLs to improve cache hit ratio
# See: https://pagure.io/fedora-infrastructure/issue/7383
set req.url = regsub(req.url, "^/repos/[^/]+/[^/]+/[^/]+/toplink/", "/");
return (hash);
}