Skip to content

DNS_CACHE module

This module is an implementation of a cache system designed for DNS records. For successful DNS queries of all types, the module will store in a cache/db backend the mappings, for TTL number of seconds received in the DNS answer. Failed DNS queries will also be stored in the back-end, with a TTL that can be specified by the user. The module uses the Key-Value interface exported from the core.

A cachedb_* type module must be loaded before loading the dns_cache module.

The url of the key-value back-end that will be used for storing the DNS records.

Set cachedb_url parameter
...
#use internal cachedb_local module
modparam("dns_cache", "cachedb_url","local://")
#use cachedb_memcached module with memcached server at 192.168.2.130
modparam("dns_cache", "cachedb_url","memcached://192.168.2.130:8888/")
...

The number of seconds that a failed DNS query will be kept in cache. Default is 3600.

Set blacklist_timeout parameter
...
modparam("dns_cache", "blacklist_timeout",7200) # 2 hours
...

The minimum number of seconds that a DNS record will be kept in cache. If the TTL received in the DNS answer is lower than this value, the record will be cached for min_ttl seconds.

Default value is 0 seconds (no minimum TTL is enforced).

Set min_ttl parameter
...
modparam("dns_cache", "min_ttl",300) # 5 minutes
...

The module does not export functions to be used in configuration script.

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Liviu Chircu (@liviuchircu)1611127125
2.Vlad Paiu (@vladpaiu)15510085
3.Razvan Crainea (@razvancrainea)12101315
4.Bogdan-Andrei Iancu (@bogdan-iancu)972415
5.Leo Smith864111
6.Stefan Darius6410915
7.Alexandra Titoc3197
8.James Stanley3122
9.Maksym Sobolyev (@sobomax)3122
10.Peter Lemenkov (@lemenkov)3111

All remaining contributors: Vlad Patrascu (@rvlad-patrascu).

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits

(3) ignoring whitespace edits, renamed files and auto-generated files

#NameCommit Activity
1.Stefan DariusJun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Feb 2012 - Jun 2026
3.James StanleyJun 2025 - Jun 2025
4.Leo SmithMar 2025 - Mar 2025
5.Bogdan-Andrei Iancu (@bogdan-iancu)Jun 2012 - Dec 2024
6.Alexandra TitocSep 2024 - Sep 2024
7.Maksym Sobolyev (@sobomax)Feb 2023 - Feb 2023
8.Liviu Chircu (@liviuchircu)Mar 2014 - Apr 2021
9.Peter Lemenkov (@lemenkov)Jun 2018 - Jun 2018
10.Vlad Patrascu (@rvlad-patrascu)May 2017 - May 2017

All remaining contributors: Vlad Paiu (@vladpaiu).

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Leo Smith, Peter Lemenkov (@lemenkov), Liviu Chircu (@liviuchircu), Bogdan-Andrei Iancu (@bogdan-iancu), Vlad Paiu (@vladpaiu).

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0