title: How to display the age of an nginx cached file in headers
body: <p>I've set up a caching server for a site through nginx 1.6.3 on CentOS 7, and it's configured to add http headers to served files to show if said files came from the caching server (HIT, MISS, or BYPASS) like so:</p>
  
  <pre><code>add_header X-Cached $upstream_cache_status;
  </code></pre>
  
  <p>However, i'd like to see if there's a way to add a header to display the age of the cached file, as my solution has <code>proxy_cache_valid 200 60m;</code> set, and i'd like to check that it's respecting that setting.</p>
  
  <p>So what i'm looking for would be something like:</p>
  
  <pre><code>add_header Cache-Age $upstream_cache_age;
  </code></pre>
  
  <p>I'm unable to find anything of the sort though, can you help?</p>
  
  <p>Thanks</p>