prorm API Reference
    Preparing search index...

    Class MomentoStore

    MomentoStore wraps a Momento CacheClient behind the NoSqlStore lifecycle and an edge-KV get/set/del/list/incr surface.

    Implements

    Index
    name: "momento" = 'momento'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "@gomomento/sdk" = '@gomomento/sdk'

    The client library being used

    • Read a key from the configured cache. Returns the Momento response object.

      Parameters

      • key: string

      Returns Promise<any>

    • Write value under key. Strings are stored verbatim; other values are JSON-serialized. options.ttl sets a per-item TTL in seconds.

      Parameters

      Returns Promise<any>

    • Delete a key from the configured cache.

      Parameters

      • key: string

      Returns Promise<any>

    • Fetch the elements of a Momento list. Momento cannot enumerate cache keys, so prefix/listName names a list; defaults to defaultListName.

      Parameters

      • OptionallistName: string

      Returns Promise<any>

    • Atomically increment the numeric value at key by by (default 1).

      Parameters

      • key: string
      • by: number = 1

      Returns Promise<any>