Challenge 1
Declare a 2 GB cache with a shared key zone.
proxy_cache_path /var/cache/nginx =api:10m max_size=2g inactive=60m;
Press Ctrl⌘Enter to check your answer
Fill in cache paths, TTLs by status, stale serving, and request collapsing.
Challenge 1
proxy_cache_path /var/cache/nginx =api:10m max_size=2g inactive=60m;
Press Ctrl⌘Enter to check your answer
Challenge 2
location / {
200 301 10m;
proxy_cache_valid 404 1m;
proxy_pass http://backend;
}
Press Ctrl⌘Enter to check your answer
Challenge 3
location / {
error timeout updating;
proxy_cache api;
proxy_pass http://backend;
}
Press Ctrl⌘Enter to check your answer
Challenge 4
location / {
on;
proxy_cache_lock_timeout 5s;
proxy_cache api;
}
Press Ctrl⌘Enter to check your answer
Challenge 5
location / {
$scheme$proxy_host$request_uri;
proxy_cache api;
}
Press Ctrl⌘Enter to check your answer