@creator.co/module-identity-client - v1.1.11
    Preparing search index...

    Class representing a Memory object that interacts with a MemCache to store and retrieve cookie values.

    Index

    Constructors

    Methods

    • Asynchronously deletes a key from the cookie engine.

      Parameters

      • key: string | string[]

        The key or keys to be deleted.

      Returns Promise<unknown>

      A promise that resolves with the result of deleting the key.

    • Asynchronously retrieves the value associated with the given key from the cookie engine.

      Parameters

      • key: string

        The key to look up in the cookie engine.

      Returns Promise<unknown>

      A promise that resolves with the value corresponding to the key.

    • Sets a default value for a given key in the cookies with the specified expiration period.

      Parameters

      • key: string

        The key to set the default value for.

      • val: string

        The default value to set.

      Returns Promise<unknown>

      A promise that resolves when the default value is set in the cookies.

    • Sets a long-lived value in the cookies with the specified key and value.

      Parameters

      • key: string

        The key to set in the cookies.

      • val: string

        The value to associate with the key.

      Returns Promise<unknown>

      A promise that resolves when the value is successfully set in the cookies.

    • Sets a cookie value with the given key and value, and an optional time-to-live (TTL) in seconds.

      Parameters

      • key: string

        The key of the cookie.

      • val: string

        The value to set for the cookie.

      • Optionalttl: number

        The time-to-live for the cookie in seconds (optional).

      Returns Promise<unknown>

      A promise that resolves once the cookie is set.