dns_cache Module

Vladut-Stefan Paiu

   OpenSIPS Solutions

Edited by

Vladut-Stefan Paiu

   Copyright © 2012 www.opensips-solutions.com
     __________________________________________________________

   Table of Contents

   1. Admin Guide

        1.1. Overview
        1.2. Dependencies

              1.2.1. OpenSIPS Modules

        1.3. Exported Parameters

              1.3.1. cachedb_url (string)
              1.3.2. blacklist_timeout (int)

        1.4. Exported Functions

   List of Examples

   1.1. Set cachedb_url parameter
   1.2. Set blacklist_timeout parameter

Chapter 1. Admin Guide

1.1. Overview

   This module is an implementation of a cache system designed for
   DNS records. For succesfull 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.

1.2. Dependencies

1.2.1. OpenSIPS Modules

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

1.3. Exported Parameters

1.3.1. cachedb_url (string)

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

   Example 1.1. 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/");
...

1.3.2. blacklist_timeout (int)

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

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

1.4. Exported Functions

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