<div dir="ltr">Thanks Maxim!!</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 7, 2019 at 4:47 AM Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
On Sun, Jan 06, 2019 at 03:07:00PM +0200, Andrei wrote:<br>
<br>
> I was wondering how can I force cache of a $request_uri (/abc) for 10<br>
> minutes, but set the browser expires headers for 5 minutes?<br>
<br>
The most basic options are:<br>
<br>
- You can set Expires from your backend as desired for browser <br>
caching, and use the X-Accel-Expires header to set caching time <br>
for nginx (see <a href="http://nginx.org/r/proxy_cache_valid" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_cache_valid</a>).<br>
<br>
- You can configure nginx to ignore Expires and Cache-Control as <br>
set by your backend (see <a href="http://nginx.org/r/proxy_ignore_headers" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_ignore_headers</a>), <br>
so these will be used only by browsers, and set caching time for <br>
nginx manually with proxy_cache_valid (see <br>
<a href="http://nginx.org/r/proxy_cache_valid" rel="noreferrer" target="_blank">http://nginx.org/r/proxy_cache_valid</a>).<br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>