You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using PowerDNS Recursor 5.2.0 and we are trying to disable cache for certain request patterns. For example : when a client requests "blablabla.com", the recursor should not cache the answer.
So far we tried:
The preresolve() function and "dq.variable = true", but it doesn't seem to work as we can't resolve our records anymore.
The postresolve() function, like this (with and without the dq.variable // with a ttl set at 1 second):
function postresolve(dq)
pdnslog("postresolve called for "..dq.qname:toString())
local records = dq:getRecords()
for k,v in pairs(records) do
pdnslog(k.." "..v.name:toString().." "..v:getContent())
if v.type == pdns.TXT and dq.qname:toString():match("our_pattern") then
pdnslog("Changing ttl!")
v.ttl = 1
dq.variable = true
end
end
dq:setRecords(records)
return true
end
But it doesn't work either, the answer is still cached.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
We're using PowerDNS Recursor 5.2.0 and we are trying to disable cache for certain request patterns. For example : when a client requests "blablabla.com", the recursor should not cache the answer.
So far we tried:
The preresolve() function and "dq.variable = true", but it doesn't seem to work as we can't resolve our records anymore.
The postresolve() function, like this (with and without the dq.variable // with a ttl set at 1 second):
But it doesn't work either, the answer is still cached.
Any (simple) idea?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions