]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
implement basic infrastructure for scoped cache marek/support-scoped-cache
authorMarek Vavruša <mvavrusa@cloudflare.com>
Tue, 10 Apr 2018 06:11:16 +0000 (23:11 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 27 Apr 2018 06:59:15 +0000 (23:59 -0700)
commitb11c237679e7d49ead619eae3f6ad40a7a6912c5
tree5075d498be7dc80b0baa99fbf84e290c0f88ab19
parent44a03fd6462653b6210940366efa0866cf622284
implement basic infrastructure for scoped cache

This commit adds support for scoped cache, e.g. keys can be tagged
with a scope, so that the same key can exist in multiple scope and
returns the value based on the scope set.

This is practically requires for scoping by subnet in ECS, but
it doesn't implement ECS completely. This is just a framework
to make something like ECS possible in a module.

The scope search is currently non-exhaustive, it either returns
a value bound to given scope or look into global scope, nothing
in between.
daemon/lua/kres-gen.lua
daemon/lua/kres-gen.sh
lib/cache/api.c
lib/cache/api.h
lib/cache/entry_pkt.c
lib/cache/impl.h
lib/resolve.c
lib/resolve.h
tests/test_cache.c