> On 20 Apr 2024, at 19:59, Jacob Bunk Nielsen via dnsdist > <dnsdist@mailman.powerdns.com> wrote: > > Fredrik Pettai via dnsdist <dnsdist@mailman.powerdns.com> writes: > >>> addAction(NetmaskGroupRule(no_cache_ips, true), SetSkipCacheAction()) >> >> Slightly OT, I wonder if it would be possible to reverse the suggested >> solution, >> to cache only queries from specific IPs and skip the caching "for the rest” ? > > You can just do something like this: > > cache_ips = newNMG() > > -- IPs of clients that should use the cache > cache_ips:addMask('192.0.2.1/32') > cache_ips:addMask('192.0.2.8/32') > > addAction(NotRule(NetmaskGroupRule(cache_ips, true)), SetSkipCacheAction())
Ah, a reversing selector, I didn’t know that it existed. Thanks for the pointer! Re, /P
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist