Complete the code to define the cache path directory.
proxy_cache_path /var/cache/nginx/[1] levels=1:2 keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
The proxy_cache_path directive requires the directory path where cached files are stored. Here, cache is the correct directory name.
Complete the code to set the cache zone name.
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=[1]:10m max_size=1g inactive=60m use_temp_path=off;
The keys_zone parameter defines the name of the shared memory zone for caching keys. my_cache is a common example name.
Fix the error in the cache levels configuration.
proxy_cache_path /var/cache/nginx/cache levels=[1] keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
The levels parameter requires colon-separated numbers like 1:2. Commas or dashes are invalid syntax.
Fill both blanks to configure cache size and inactive time.
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my_cache:10m max_size=[1] inactive=[2] use_temp_path=off;
max_size sets the maximum cache size, commonly 1g for 1 gigabyte. inactive sets how long cached items stay without access, here 60m for 60 minutes.
Fill all three blanks to complete the proxy_cache_path with temp path usage off.
proxy_cache_path /var/cache/nginx/cache levels=[1] keys_zone=[2]:10m max_size=[3] inactive=60m use_temp_path=off;
The correct configuration uses levels=1:2, keys_zone=my_cache:10m, and max_size=1g to properly set cache directory structure, zone name, and size.