title: cache 301 redirect for a long time
body: <p>I would like to cache a 301 redirect. Most of the questions are about how to avoid the cache.
  I was thinking to add this in php :</p>
  <pre><code>$seconds_to_cache = 3600 * 60 * 24 * 1000;
  $ts = gmdate(&quot;D, d M Y H:i:s&quot;, time() + $seconds_to_cache) . &quot; GMT&quot;;
  header(&quot;Expires: $ts&quot;);
  header(&quot;Pragma: cache&quot;);
  header(&quot;Cache-Control: max-age=$seconds_to_cache&quot;);
  </code></pre>
  <p>Would it be better if I do this in nginx config? If yes, how should the config look like?
  Did anyone try this? Do modern browser(chrome, firefox, mobile browsers) keep the cache? Do they lose the cache after the restart?</p>
  <p>Thanks</p>