Bug 1478639 - Use consistent caching, have 301's expire after 10min rather than 1 day.
Bug 1478639 - Use consistent caching, have 301's expire after 10min rather than 1 day.

Firefox(/browsers) cache 301 results which makes them hard for users to
deal with since the normal "refresh" mechanism is no good once you've been
redirected to the target location.  The 301 redirect mechanism is used by
the REPO/define?q=TERM mechanism served by router.py.

In order to reduce users experiencing stale redirects and needing to
disable/purge their cache, we set the expiration time to 10 minutes.

Although the redirects are generated in router.py, the actual cache
lifetime comes from the nginx config, so we alter it there using nginx's
map module, documented at
https://nginx.org/en/docs/http/ngx_http_map_module.html

In the process of implementing and testing this, I realized that we
were actually only providing expiration directives for REPO/source and
"/".  All the proxy_pass'ed connections did not get expiration
directives, so the browser would use its own heuristics.  I've changed
this to specify the expiration directive at a server level.  We may not
actually want this.  Or maybe we do, but maybe we want the default to
be less than 1 day.

bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox