Class RedisStorageService<T>

class RedisStorageService

Type Parameters

Hierarchy

Implements

Constructors

Properties

redis: Redis

ioredis client

tableName: string

Virtual table name

ttl: number

Default time to live of a model

CAS_MAX_RETRIES: 5 = 5

Maximum retry count of check-and-save behavior

Static

ENV_REDIS_ENDPOINT: "MY_REDIS_ENDPOINT" = 'MY_REDIS_ENDPOINT'

Environment variable name for redis server endpoint

Static

Methods

  • Private

    Prepare new model - original model + update + increment

    Parameters

    • orig: T
    • Optional update: T
    • Optional increment: T

    Returns T

  • Private

    Update key w/ check-and-save behavior and retries

    Parameters

    • id: string
    • Optional update: T

      (optional) model to update

    • Optional increment: T

      (optional) model to increment

    Returns Promise<T>

  • Private

    Check transaction results and throw if error occurred

    Parameters

    • results: [Error, any][]

      transaction pipeline execution results

    Returns void

Generated using TypeDoc