Set beresp.ttl based on Cache Control header

fatblowfish fatblowfish at gmail.com
Mon Apr 2 07:51:26 CEST 2012


On Fri, Mar 30, 2012 at 11:43 AM, Roberto O. Fernández Crisial <
roberto.fernandezcrisial at gmail.com> wrote:

> Hi fatblowfish (?),
>
> Maybe you should try with something like:
>
> if req.url ~ REGEX ( set beresp.ttl == TIME)
>
> I see...thanks! I found something [0] that sort of seems like what I want
to achieve.

Still, I wish the feature I wanted was in VCL...

[0] -
https://www.varnish-cache.org/trac/wiki/VCLExampleExtendingCacheControl

On vcl_fetch subrutine.
>
>
> All the best,
> Roberto (a.k.a. @rofc)
>
> On Thu, Mar 29, 2012 at 7:34 PM, fatblowfish <fatblowfish at gmail.com>wrote:
>
>> Hi,
>>
>> I'm pretty much a Varnish 3 newb...
>>
>> Would it be a good idea to set the beresp.ttl for a specific url based on
>> the cache control header, if present and set public? What can be the
>> tradeoff for doing that?
>>
>> Any hints/examples are appreciated too.
>>
>> Thanks!
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120402/c32befca/attachment.html>


More information about the varnish-misc mailing list