I'm testing an nginx config with 40k server blocks acting as proxies (proxy_pass). Each server block has its own proxy_cache_path. The "nginx -t" takes about 5 minutes to complete. The config test duration is even exponential if I add more server blocks and proxy_cache_path. Changing any parameter of the proxy_cache_path doesn't change the config test duration.
It only takes 30s for nginx -t if I use a single proxy_cache_path for all 40k server blocks.
Do you know why a lot of proxy_cache_path's slow down nginx startup, reload and nginx -t?