Hi Christof, On 05/10/2022 12:06, Chen, Christof via dnsdist wrote:
I use separate caches for various pools. Now I want to delete a given FQDN from the cache, but I don't know immediately in which cache it is - so I would like to simpy expungeByName it from all caches.Is there a straightforward way to address all pools or iterate over all pools? I would like to avoid hardcoding my list of pools here:getPool("poolA"):getCache():expungeByName(newDNSName("what.ever.name <http://what.ever.name>")) getPool("poolB"):getCache():expungeByName(newDNSName("what.ever.name <http://what.ever.name>"))[...several more pools with caches...] Maybe some Lua magic with getPools()?
I'm afraid I don't see an easy way to do that, short of parsing the output of 'showPools()'. It would not be too hard to write a Lua function returning the list of all the existing pools, though. Would you mind opening a feature request on GH so that idea doesn't get lost?
Cheers, -- Remi Gacogne PowerDNS.COM BV - https://www.powerdns.com/
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist