Setu-TS
    Preparing search index...

    Interface IRedisClient

    Structural shape of an ioredis-compatible client. Used for validation and injection so that the plugin does not hard-depend on ioredis.

    0.1.0

    interface IRedisClient {
        connect?(): Promise<void>;
        del(...keys: string[]): Promise<number>;
        exists(key: string): Promise<number>;
        get(key: string): Promise<string | null>;
        ping(): Promise<string>;
        quit(): Promise<void>;
        scan(
            cursor: string,
            matcher: string,
            matchValue?: string,
        ): Promise<[string, string[]]>;
        set(
            key: string,
            value: string,
            ttlMode?: "EX",
            ttlSeconds?: number,
        ): Promise<string | null>;
    }
    Index
    • Pings the server (M90b). The Redis store's reachability probe invokes it; a PONG response proves the backend is reachable, and a rejection does not. The real ioredis client implements it.

      Returns Promise<string>

      The server's PONG reply

      0.5.0

    • Cursor-based scan. Returns [cursor, keys[]]. Use '0' to start and continue until cursor returns '0'.

      Parameters

      • cursor: string
      • matcher: string
      • OptionalmatchValue: string

      Returns Promise<[string, string[]]>

    • Set a key with optional TTL.

      Parameters

      • key: string
      • value: string
      • OptionalttlMode: "EX"
      • OptionalttlSeconds: number

      Returns Promise<string | null>