Class CacheAbstract

A cache is a database that stores information about zones.

Caches differ from stores in that they are designed to be relatively ephemeral, and they do not make attempts to resolve wildcard records. All cache lookups should be O(1) operations and should be as fast as possible.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

handler: Handler

Methods

  • Append information about a zone in the cache.

    Type Parameters

    Parameters

    • zone: string

      the zone to append

    • rType: T

      the record type to append

    • data: ZoneData[T]

      the data to append

    Returns Awaitable<void>

  • Delete information about a zone in the cache.

    Type Parameters

    Parameters

    • zone: string

      the zone to delete

    • rType: T

      the record type to delete. If not provided, all records in the zone should be deleted.

    • Optionaldata: ZoneData[T]

      the data to delete. If not provided, all records of the given type should be deleted.

    Returns Awaitable<void>

  • Get information about a zone in the cache.

    Type Parameters

    Parameters

    • zone: string

      the zone to get

    • rType: T

      the record type to get. If not provided, all records in the zone should be retrieved.

    Returns Awaitable<null | ZoneData[T][] | (
        | CaaData
        | DnskeyData
        | DsData
        | HInfoData
        | MxData
        | NaptrData
        | NsecData
        | Nsec3Data
        | RpData
        | RrsigData
        | SrvData
        | SoaData
        | SshfpData
        | TlsaData
        | TxtData)[]>