DNS_CACHE module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”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.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”A cachedb_* type module must be loaded before loading the dns_cache module.
Exported Parameters
Section titled “Exported Parameters”cachedb_url (string)
Section titled “cachedb_url (string)”The url of the key-value back-end that will be used for storing the DNS records.
...#use internal cachedb_local modulemodparam("dns_cache", "cachedb_url","local://")#use cachedb_memcached module with memcached server at 192.168.2.130modparam("dns_cache", "cachedb_url","memcached://192.168.2.130:8888/")...blacklist_timeout (int)
Section titled “blacklist_timeout (int)”The number of seconds that a failed DNS query will be kept in cache. Default is 3600.
...modparam("dns_cache", "blacklist_timeout",7200) # 2 hours...min_ttl (int)
Section titled “min_ttl (int)”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).
...modparam("dns_cache", "min_ttl",300) # 5 minutes...Exported Functions
Section titled “Exported Functions”The module does not export functions to be used in configuration script.
Contributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Liviu Chircu (@liviuchircu) | 16 | 11 | 127 | 125 |
| 2. | Vlad Paiu (@vladpaiu) | 15 | 5 | 1008 | 5 |
| 3. | Razvan Crainea (@razvancrainea) | 12 | 10 | 13 | 15 |
| 4. | Bogdan-Andrei Iancu (@bogdan-iancu) | 9 | 7 | 24 | 15 |
| 5. | Leo Smith | 8 | 6 | 41 | 11 |
| 6. | Stefan Darius | 6 | 4 | 109 | 15 |
| 7. | Alexandra Titoc | 3 | 1 | 9 | 7 |
| 8. | James Stanley | 3 | 1 | 2 | 2 |
| 9. | Maksym Sobolyev (@sobomax) | 3 | 1 | 2 | 2 |
| 10. | Peter Lemenkov (@lemenkov) | 3 | 1 | 1 | 1 |
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
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Stefan Darius | Jun 2026 - Jul 2026 |
| 2. | Razvan Crainea (@razvancrainea) | Feb 2012 - Jun 2026 |
| 3. | James Stanley | Jun 2025 - Jun 2025 |
| 4. | Leo Smith | Mar 2025 - Mar 2025 |
| 5. | Bogdan-Andrei Iancu (@bogdan-iancu) | Jun 2012 - Dec 2024 |
| 6. | Alexandra Titoc | Sep 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
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Leo Smith, Peter Lemenkov (@lemenkov), Liviu Chircu (@liviuchircu), Bogdan-Andrei Iancu (@bogdan-iancu), Vlad Paiu (@vladpaiu).
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0