-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for redis cachedb backend #2
Conversation
this is necessary for BSDs and OSX to build cachedb.c.
this is necessary to bulid cachedb on MacOS X (the previous fix wasn't enough).
Thanks @jinmeiib ! that's great. I am really happy to see this getting in. |
Thanks for the comment. Yes, I think that makes sense especially if we expect more backend will be added. I don't remember why I chose the single-file approach at that point, but perhaps it's because the size of redis-specific code isn't expected to be too big and I was not sure if we really have more backends and the speparation would be premature generalization. Anyway, I'm now asking NLNet Labs people for a review. If they want me to separate it, I'm happy to do that. If they want to make it by themselves and merge it, that's also fine. If they want to keep the current style for now, that's also fine for me. |
Hi Jinmei,
Thanks for the patch, I have added it! Attributed to Jinmei Tatuya
(Infoblox).
Also separated out the code into cachedb/redis.c, as asked by chantra.
Best regards, Wouter
…On 09/03/18 00:38, JINMEI Tatuya wrote:
This change adds to unbound support for a new cached backend that uses a
Redis server as the storage.
This implementation depends on the hiredis client library
(https://redislabs.com/lp/hiredis/). And unbound should be built with
both --enable-cachedb and --with-libhiredis[=path] (where
/include/hiredis/hiredis.h should exist).
I've locally confirmed the following:
* build succeeds with or without --with-libhiredis on Linux (Ubuntu
16.04.5), MacOS X 10.11.6 and FreeBSD 10.3.
* 'make test' passed (on Linux)
* 'make longtest' passed (on Linux)
------------------------------------------------------------------------
You can view, comment on, or merge this pull request online at:
#2
Commit Summary
* added support for redis cachedb backend.
* added querycachedb utility.
* regenerated lex/yacc derived files
* regenerated configure script
* check sys/endian.h and include it in cachedb if it exists
* regenerate configure script
* include libkern/OSByteOrder.h when available
* regenerate configure script
File Changes
* *M* cachedb/cachedb.c
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-0> (257)
* *M* config.h.in
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-1> (14)
* *M* configure
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-2> (94)
* *M* configure.ac
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-3> (36)
* *M* contrib/README
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-4> (3)
* *A* contrib/unbound-querycachedb.py
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-5> (77)
* *M* doc/example.conf.in
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-6> (8)
* *M* doc/unbound.conf.5.in
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-7> (55)
* *M* util/config_file.h
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-8> (8)
* *M* util/configlexer.c
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-9> (3971)
* *M* util/configlexer.lex
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-10> (3)
* *M* util/configparser.c
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-11> (1754)
* *M* util/configparser.h
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-12> (40)
* *M* util/configparser.y
<https://github.com/NLnetLabs/unbound/pull/2/files#diff-13> (44)
Patch Links:
* https://github.com/NLnetLabs/unbound/pull/2.patch
* https://github.com/NLnetLabs/unbound/pull/2.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE-ozxE3FNhcj3_nEoikDEzh2LM4QUwwks5tccDvgaJpZM4SjhjN>.
|
Review changes for the XoT branch
Added ttl for redis values.
This change adds to unbound support for a new cached backend that uses a Redis server as the storage.
This implementation depends on the hiredis client library (https://redislabs.com/lp/hiredis/). And unbound should be built with both --enable-cachedb and --with-libhiredis[=PATH] (where $PATH/include/hiredis/hiredis.h should exist).
I've locally confirmed the following: