Re: Softpurge and nearly immediate refresh?

2018-04-12 Thread Danila Vershinin
Ah, I’m using Varnish 4.1, guess might have to look into >= 5.2. Thanks! :) Best Regards, Danila > On 12 Apr 2018, at 12:25, Guillaume Quintard > wrote: > > bereq.is_bgfetch? > > -- > Guillaume Quintard > > On Thu, Apr 12, 2018, 09:24 Danila Vershinin

Re: Softpurge and nearly immediate refresh?

2018-04-12 Thread Danila Vershinin
Couldn’t really find anything useful besides obj.hits which indirectly tells us it’s a background fetch. So: sub vcl_deliver { if (req.http.grace == "normal(limited)" && obj.hits == 0 && req.http.Varied-Header = 'value1') { set req.http.Varied-Header = 'value2’; unset

Re: VCL: returning early from a custom function

2018-04-12 Thread Cosimo Streppone
On Wed, Apr 11, 2018, at 16:43, Anheyer, Tom wrote: > What about: > > sub rate_limit { > > if (req.url ~ "pattern1") { >std.log("pattern1 requests must never be throttled"); > } > else { > if (req.url ~ "pattern2") { > if

Re: Softpurge and nearly immediate refresh?

2018-04-12 Thread Guillaume Quintard
bereq.is_bgfetch? -- Guillaume Quintard On Thu, Apr 12, 2018, 09:24 Danila Vershinin wrote: > Couldn’t really find anything useful besides obj.hits which indirectly > tells us it’s a background fetch. So: > > sub vcl_deliver { >if (req.http.grace == "normal(limited)" &&

Re: Softpurge and nearly immediate refresh?

2018-04-12 Thread Pål Hermunn Johansen
> On 12 Apr 2018, at 12:25, Guillaume Quintard > wrote: > > bereq.is_bgfetch? 2018-04-12 11:28 GMT+02:00 Danila Vershinin : > Ah, I’m using Varnish 4.1, guess might have to look into >= 5.2. Not necessary - is_bgfetch was back ported to 4.1, and