<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Jinmei,<br>
</p>
<div class="moz-cite-prefix">On 19/01/25 18:20, 神明達哉 wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJE_bqcHwu-551Nm0o6++LEBqzkU1VrgrHW5wffHF1CXk65LGw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">At Thu, 24 Jan 2019 22:16:25 +0100,<br>
Fredrik Pettai via Unbound-users <<a
href="mailto:unbound-users@nlnetlabs.nl"
moz-do-not-send="true">unbound-users@nlnetlabs.nl</a>>
wrote:<br>
<br>
> Will unbound _only_ serve hits from redis cache for keys
with expired<br>
> TTL if the configuration option "serve-expired: yes" is
set?<br>
> <br>
> I've just tested redis cache very briefly, and it looks
like keys with<br>
> an expired TTL didn't get updated then I asked for the
same name again.<br>
> (If recursion happened, why not update the TTL in cachedb
too?)<br>
<br>
I'm not sure if I understand your question correctly, but IIRC
the<br>
intended behavior for the mixture of cachedb (regardless of
the type<br>
of the backend, redis or not) and serve-expired is as follows:<br>
<br>
- when unbound finds an expired answer for a received query in<br>
in-memory cache, it will still return it to the client if<br>
sever-expired is yes. it will also initiate a "prefetch" of
the<br>
answer to possibly update the expired answer.<br>
- in a prefetch, any cache including cachedb is ignored and it
should<br>
always cause recursive DNS resolution<br>
- If the recursive resolution succeeds, unbound updates its
in-memory<br>
cache and cachedb backend with the updated answer<br>
<br>
I've not played with this feature for some time, so something
may have<br>
changed since then. But I believe it worked as described
above last<br>
time I tested the feature. A quick read of the latest code
also<br>
seems to suggest it's still working that way.<br>
<br>
Does this explanation answer your question? Or are you saying
that<br>
this is your expected behavior but unbound doesn't work this
way for<br>
you?<br>
</div>
</div>
</blockquote>
<p>Ah, my test was very brief and simple, and I didn't have prefetch
enabled.</p>
<p>But getting the full picture it makes sense on how it all fits
together.<br>
</p>
<p> Thanks for the explanation, I tested it again with all options
enabled, and yes now it works better.</p>
<p>(perhaps that should be added to the man page under cachedb) </p>
<p>Re,<br>
</p>
<p>/P<br>
</p>
<p><br>
</p>
</body>
</html>