Add cache_capacity option to dnssec middleware for the capacity of LRU cache (#339)

This fix adds a `cache_capacity` option to dnssec middleware, so that
it is possible to specify the capacity of the LRU cache used by dnssec
middleware.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2016-10-18 13:33:23 -07:00
committed by GitHub
parent 4d55f90388
commit ad7e78ec31
3 changed files with 58 additions and 30 deletions

View File

@@ -26,6 +26,7 @@ TODO(miek): think about key rollovers, and how to do them automatically.
~~~
dnssec [ZONES... ] {
key file KEY...
cache_capacity CAPACITY
}
~~~
@@ -33,4 +34,9 @@ dnssec [ZONES... ] {
will be signed with all keys. Generating a key can be done with `dnssec-keygen`: `dnssec-keygen -a
ECDSAP256SHA256 <zonename>`. A key created for zone *A* can be safely used for zone *B*.
* `cache_capacity` indicates the capacity of the LRU cache. The dnssec middleware uses LRU cache to manage
objects and the default capacity is 10000.
## Examples