Optional
options: DefaultCacheOptionsThe internal cache data structure
The cache handler function that is used to answer queries.
The maximum number of entries the cache should accept before discarding an entry.
Get the current size of the cache.
Note that this refers to the number of unique zone/record type pairs in the cache, not the total number of records stored, as each zone/record type pair can store one or more records.
The number of unique zone/record type pairs in the cache.
Append information about a zone in the cache.
The zone to append
The record type to append
The data to append
Delete information about a zone in the cache.
The zone to delete
The record type to delete
Optional
data: The data to delete
Get information about a zone/record type pair in the cache.
The zone to get data for
The record type to get data for.
The data for the given zone and record type, or null if no data is found.
Set or update information about a zone in the cache.
Static
getGet the key for a given zone and record type.
The default key format is zone:rType
.
The zone to get the key for
The record type to get the key for
A simple in-memory cache that stores data in a Map.
The default cache is a simple map that stores domain/record type pairs as keys and the corresponding data as values.
The cache makes no attempt to implement an LRU eviction policy, as these can be computationally expensive to manage and may not necessarily provide a significant benefit over a simple random eviction policy. Domains that are queried often will naturally get inserted into the cache quickly after being evicted.