Dalmart
    Preparing search index...

    Represents a connection to a redis database.

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Deletes a key in the database or deletes all keys in the database.

      Parameters

      • Optionalkey: string

        The key to delete. If this is undefined, then all keys should be deleted.

      Returns Promise<void>

    • Gets the value of a specific key in the database.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to retrieve.

      • Optionalfallback: T

      Returns Promise<null | T>

      The value of the given key, null if no such value exists and no fallback was provided.

    • Creates or updates a key value.

      Type Parameters

      • T

      Parameters

      • key: string

        The key to update.

      • value: T

        The value to set.

      Returns Promise<T>

      The value that was written.