polarity-integration-utils
    Preparing search index...

    Function createCacheKey

    • Creates a cache-safe key by hashing the input values with SHA-256 and prepending a descriptive prefix.

      Use this to derive cache keys from dynamic or sensitive data (entity values, credentials, etc.) that may contain characters outside the allowed set.

      Parameters

      • prefix: string

        A short descriptive label using only letters, digits, dots, underscores, and hyphens (must match /^[a-zA-Z0-9._-]+$/).

      • value: string

        First value to hash (required).

      • ...values: string[]

        Additional values to hash (e.g., further credentials or identifiers).

      Returns string

      A key in the form prefix_<64-char hex hash>.

      LibraryUsageError If prefix or value is not a string, if prefix is empty or contains invalid characters, if any additional value is not a string, or if the resulting key would exceed 250 characters.