Base class for all persistence layers. This class provides the basic functionality for saving, retrieving, and deleting idempotency records. It also provides the ability to configure the persistence layer from the idempotency config.

Abstract

Implements

Hierarchy (view full)

Implements

Constructors

Properties

idempotencyKeyPrefix: string

Methods

  • Validates an existing record against the data payload being processed. If the payload does not match the stored record, an IdempotencyValidationError error is thrown.

    Whenever a record is retrieved from the persistence layer, it should be validated against the data payload being processed. This is to ensure that the data payload being processed is the same as the one that was used to create the record in the first place.

    The record is also saved to the local cache if local caching is enabled.

    Parameters

    Returns IdempotencyRecord