Maintained by: NLnet Labs

[Unbound-users] Prefetch

Scott A. Johnson
Wed Dec 7 08:26:45 CET 2011


Perfect! Thank you, Luo!

Scott



On Dec 6, 2011, at 22:24, Luo Ce <luoce at cnnic.cn> wrote:

> Hi Scott,
>
> In the file msgreply.h there is a marco definition below:
>
> /** calculate the prefetch TTL as 90% of original. Calculation
> * without numerical overflow (uin32_t) */
> #define PREFETCH_TTL_CALC(ttl) ((ttl) - (ttl)/10)
>
> If you only want to change the prefetch calculation, modify the marco above
> will work.
>
> Regards,
>
> Luo Ce
>
> -----Original Message-----
> From: unbound-users-bounces at NLnetLabs.nl
> [mailto:unbound-users-bounces at NLnetLabs.nl] On Behalf Of Scott A. Johnson
> Sent: Wednesday, December 07, 2011 2:09 PM
> To: unbound-users at unbound.net
> Subject: [Unbound-users] Prefetch
>
> My understanding of setting prefetch to "yes" in unbound.conf will
> cause unbound, after replying with the answer to a quarry, to re-fetch
> the requested record if the TTL is 10% or lower of the record's normal
> TTL so as to be ready for the next request for the same record.
>
> Is this how the prefetch setting is supposed to work?  If so, I now
> have another question..... where is this 10% calculation in the code?
> I looked through unbound.c and a couple other files in the SVN
> repository but couldn't find the code.  I want to make a few changes
> to the calculation and recompile for my system.  Any pointers on where
> I can find this (calculation in the) code?
>
> Thanks!
>
> Scott
>
> --
> Scott A. Johnson
> scott.a.johnson at gmail.com
> _______________________________________________
> Unbound-users mailing list
> Unbound-users at unbound.net
> http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
>