GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ANYEVENT::CACHEDNS (3)

.ds Aq ’

NAME

AnyEvent::CacheDNS - Simple DNS resolver with caching

CONTENTS

SYNOPSIS



        use AnyEvent;
        use AnyEvent::HTTP;
       
        # Register our DNS resolver as the default resolver
        use AnyEvent::CacheDNS :register;
       
        # Use AnyEvent as ususal
        my $cond = AnyEvent->condvar;
        http_get "http://search.cpan.org/", sub { $cond->send(); };
        $cond->recv();



DESCRIPTION

This module provides a very simple DNS resolver that caches its results and can improve the connection times to remote hosts.

Import

It’s possible to register the this class as AnyEvent’s main DNS resolver by passing the tag :register in the use statement.

METHODS

    register

Registers a new DNS cache instance as AnyEvent’s global DNS resolver.

    ENVIRONMENT

PERL_ANYEVENT_DNS_TTL The effect of setting this variable differs depending on AnyEvent version.
AnyEvent 5.x Default DNS response record cache TTL for older AnyEvent versions. AnyEvent::DNS <= 6.x doesn’t report record TTL and records get cached for infinite amount of time, therefore running programs won’t detect if cached DNS records have changed.

<B>NOTEB>: Setting this variable to 0 disables purging records from cache.

AnyEvent 6.x Newer versions of AnyEvent report DNS record TTL so records will be purged from the cache after <B>theirB> TTL expires. Setting this variable to any positive integer <B>OVERRIDESB> the TTL for all records to the specified value, setting variable to 0 disables purging records from the cache.

AUTHOR

Emmanuel Rodriguez <potyl@cpan.org>

COPYRIGHT

(C) 2011 Emmanuel Rodriguez - All Rights Reserved.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ANYEVENT::CACHEDNS (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.