File: fdo-cache

package info (click to toggle)
mesa 24.3.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 279,568 kB
  • sloc: ansic: 2,122,763; xml: 1,010,303; cpp: 513,137; python: 70,351; asm: 38,315; lisp: 20,211; yacc: 12,036; lex: 3,372; sh: 841; makefile: 256
file content (44 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=my_cache:10m max_size=24g inactive=48h use_temp_path=off;

server {
	listen 10.42.0.1:80 default_server;
	listen 127.0.0.1:80 default_server;
	listen [::]:80 default_server;
	resolver 8.8.8.8;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;

	server_name _;

        add_header X-GG-Cache-Status $upstream_cache_status;
        proxy_cache my_cache;

        location /cache_gitlab_artifacts {
                internal;
                # Gitlabs http server puts everything as no-cache even though
                # the artifacts URLS don't change. So enforce a long validity
                # time and ignore the headers that defeat caching
                proxy_cache_valid 200 48h;
                proxy_ignore_headers Cache-Control Set-Cookie;
                include snippets/uri-caching.conf;
        }

        location /cache {
                # special case gitlab artifacts
                if ($arg_uri ~*  /.*gitlab.*artifacts(\/|%2F)raw/ ) {
                        rewrite ^ /cache_gitlab_artifacts;
                }
                # Set a really low validity together with cache revalidation; Our goal
                # for caching isn't to lower the number of http requests but to
                # lower the amount of data transfer. Also for some test
                # scenarios (typical manual tests) the file at a given url
                # might get modified so avoid confusion by ensuring
                # revalidations happens often.
                proxy_cache_valid 200 10s;
                proxy_cache_revalidate on;
                include snippets/uri-caching.conf;
        }
}