dnsdist: add generic object cache#17561
Conversation
|
This was mostly implemented to work with: #17387, but it could be useful otherwise too I think. |
Signed-off-by: Ensar Sarajčić <dev@ensarsarajcic.com>
579fffb to
b81fd63
Compare
Signed-off-by: Ensar Sarajčić <dev@ensarsarajcic.com>
b81fd63 to
4f59f25
Compare
|
Thanks for opening this PR! I'll do a high-level review soon to see if this is something that are interested in merging, please don't spend more time on this until we have reached a decision! |
Thanks. That makes sense. |
Coverage Report for CI Build 27342075016Coverage decreased (-0.1%) to 70.976%Details
Uncovered Changes
Coverage Regressions43 previously-covered lines in 12 files lost coverage.
Coverage Stats💛 - Coveralls |
|
I'm wondering if we could somehow merge this work with the one happening in #16692, by implementing a generic enough cache class and then specializing it for DNS packets. That way we would (hopefully) avoid duplicating a lot of Lua bindings / YAML settings, if we manage to make them generic enough to apply to the packet cache and this generic object cache. Or am I too optimistic? :-) |
|
Well it seems like it could be possible, considering this cache is supposed to be generic. I need to take a deeper look into that PR, but at first glance it seems possible. |
Short description
This adds a new object usable from Lua -
GenericCache- which can be used to store any values under string keys and retrieve them later on.Checklist
I have: