[Dnsmasq-discuss] Cache Time Threshold
deadram at gmail.com
Tue Apr 8 05:33:23 BST 2008
Thanks for the bright idea :) It ain't perfect, but I made a patch
to dnsmasq-2.41 that adds a "pos-ttl" option. Basically the same as
neg-ttl, but it enforces a minimum ttl. Unfortunately, I could only get
it to work *after* the first query, so clients will get the real ttl to
begin with, then the remaining pos-ttl the Nth time. This should at
least serve your purpose, since it forces dnsmasq to keep the record
in catch for pos-ttl seconds. Keep in mind I haven't really tested
it out, but I was confident enough to plop the patch into my set-up.
Setting pos-ttl to 0 in the command line options, or in the
dnsmasq.conf file should revert dnsmasq back to the original behaviour.
I recommend pos-ttl=300 (ie: 5 minutes), but setting it as high as
86400 (1 day) shouldn't present any problems for most uses. If someone
feels like it, I think you would need to modify the ttl in the "p"
variable to change the ttl of the first request.
Robert A.M. Diamond
<deadram at gmail.com>
Your manuscript is both good and original, but the part that is good is
not original and the part that is original is not good.
-- Samuel Johnson
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4614 bytes
Desc: not available
Url : http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20080408/4329e718/dnsmasq-2.41-pos-ttl.bin
More information about the Dnsmasq-discuss