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
|
- 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
- Source:
Properties:
Name Type Description status
boolean Indicates status.
nTimeouts
number Number of timeouts cleared.
nKeys
number Number of cache items cleared.