Cache vs expires time
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:
>> 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
>> Maxim Dounin
>> nginx mailing list
>> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx