Class: CachedDNS

CachedDNS

Cached DNS Class - Override DNS Methods


new CachedDNS( [ttl] [, config])

Creates an instance of CachedDNS.

Parameters:
Name Type Argument Description
ttl number <optional>

TTL value for cache items in minutes.

config object <optional>

Config / Options object.

Properties
Name Type Argument Description
maxSize number <optional>

Maximum number of items to be stored in cache.

Source:

Methods


flush()

Flushes the cache and clears all timers. Once flushing is complete, emits flush-cache event with stats object.

Source:

overrideMethods()

Override all DNS Methods.

Source:
Returns:
Type
boolean

Events


flush-cache

Flush Cache Event.

Type: object
Properties:
Name Type Description
status boolean

Indicates status.

nTimeouts number

Number of timeouts cleared.

nKeys number

Number of cache items cleared.

Source: