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 module does not export functions to be used in configuration script.

doc copyrights:

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

#NameDevScoreCommitsLines++Lines—
1.Liviu Chircu (@liviuchircu)1510123121
2.Vlad Paiu (@vladpaiu)15510085
3.Razvan Crainea (@razvancrainea)12101315
4.Bogdan-Andrei Iancu (@bogdan-iancu)86157
5.Stefan Darius (@dariusstefan)649012
6.Vlad Patrascu (@rvlad-patrascu)2110

(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 Darius (@dariusstefan)Jun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Feb 2012 - Jun 2026
3.Bogdan-Andrei Iancu (@bogdan-iancu)Jun 2012 - Jun 2020
4.Liviu Chircu (@liviuchircu)Mar 2014 - Jun 2018
5.Vlad Patrascu (@rvlad-patrascu)May 2017 - May 2017
6.Vlad Paiu (@vladpaiu)Feb 2012 - Oct 2012

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

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

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