Speedup DNS requests with a local cache

Why

I want a local dns cache for two reasons:

How

I found this nice article on pdnsd on debian: Speedup DNS requests with a local cache, the following is based on that and the pdnsd man-pages: pdnsd and pdnsd.conf.

global {
    perm_cache = 1024;
    cache_dir = "/var/cache/pdnsd";
    run_as = "pdnsd";
    server_ip = 127.0.0.1;  // Use eth0 here if you want to allow other
                            // machines on your network to query pdnsd.
    status_ctl = on;
    paranoid = on;
    min_ttl = 60m;          // Retain cached entries at least NN minutes.
    max_ttl = 1w;           // One week.
    timeout = 10;           // Global timeout option (10 seconds).
}

server {
    label = "resolvconf";
        timeout = 5; // default is 120 seconds
        uptest = query;
       exclude = ".dbc.dk";
}

server {
       label = "dbc";
       include = ".dbc.dk";
    timeout = 1; // default is 120 seconds
           ip=172.20.1.62;
           ip=172.16.1.16;       
    ip=193.111.162.131;

}


source {
    owner = localhost;
    file = "/etc/hosts";
}

rr {
    name = localhost;
    reverse = on;
    a = 127.0.0.1;
    owner = localhost;
    soa = localhost,root.localhost,42,86400,900,86400,86400;
}


rr {
    name = kelut;
    cname = kelut.dbc.dk;
}

// ... lots of cnames here...

Notes