title: Nginx cache inactive vs proxy_cache_valid
body: <p>Nginx cache config:</p>
  <pre><code>proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g 
                   inactive=60m use_temp_path=off;
  
  server {
      # ...
      location / {
          proxy_cache my_cache;
          proxy_cache_valid 5m;
          proxy_pass http://my_upstream;
      }
  }
  </code></pre>
  <p>inactive</p>
  <blockquote>
  <p>inactive specifies how long an item can remain in the cache without being accessed. In this example, a file that has not been requested for 60 minutes is automatically deleted from the cache by the cache manager process, regardless of whether or not it has expired.</p>
  </blockquote>
  <p>proxy_cache_valid</p>
  <blockquote>
  <p>Sets caching time for different response codes.If only caching time is specified then only 200, 301, and 302 responses are cached.</p>
  </blockquote>
  <p>Does <code>proxy_cache_valid</code> override inactive? 5m later does the cached file exist or not?</p>