Cache vs expires time
Andrei
lagged at gmail.com
Tue Jan 8 07:55:30 UTC 2019
Is there a way to conditionally use proxy_ignore_headers? I'm trying to
only ignore headers for requests which have $skip_cache = 0 for example
On Tue, Jan 8, 2019 at 9:45 AM Andrei <lagged at gmail.com> wrote:
> Thanks Maxim!!
>
> On Mon, Jan 7, 2019 at 4:47 AM Maxim Dounin <mdounin at mdounin.ru> wrote:
>
>> Hello!
>>
>> On Sun, Jan 06, 2019 at 03:07:00PM +0200, Andrei wrote:
>>
>> > I was wondering how can I force cache of a $request_uri (/abc) for 10
>> > minutes, but set the browser expires headers for 5 minutes?
>>
>> The most basic options are:
>>
>> - You can set Expires from your backend as desired for browser
>> caching, and use the X-Accel-Expires header to set caching time
>> for nginx (see http://nginx.org/r/proxy_cache_valid).
>>
>> - You can configure nginx to ignore Expires and Cache-Control as
>> set by your backend (see http://nginx.org/r/proxy_ignore_headers),
>> so these will be used only by browsers, and set caching time for
>> nginx manually with proxy_cache_valid (see
>> http://nginx.org/r/proxy_cache_valid).
>>
>> --
>> Maxim Dounin
>> http://mdounin.ru/
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190108/9ab3d1da/attachment.html>
More information about the nginx
mailing list