Scene-scoped storage interface for key-value pairs from the Server Side Storage service. This is NOT filesystem storage - data is stored in the remote storage service.

Hierarchy

Methods

  • Deletes a value from scene storage in the Server Side Storage service.

    Returns

    A promise that resolves to true if deleted, false if not found

    Parameters

    • key: string

      The key to delete

    Returns Promise<boolean>

  • Retrieves a value from scene storage by key from the Server Side Storage service.

    By default (cacheReads), values read or written during the last cacheMaxAgeMs are served from a local cache without a network request, including confirmed "not found" results. Concurrent gets for the same key share one request. Out-of-band writers (e.g. CLI storage commands) may not be visible for up to cacheMaxAgeMs — pass { fresh: true } to force a network read.

    Returns

    A promise that resolves to the parsed JSON value, or null if not found

    Type Parameters

    • T = unknown

    Parameters

    • key: string

      The key to retrieve

    • Optional options: GetOptions

      Optional { fresh } to bypass the read cache

    Returns Promise<null | T>

  • Stores a value in scene storage in the Server Side Storage service.

    Type Parameters

    • T = unknown

    Parameters

    • key: string

      The key to store the value under

    • value: T

      The value to store (will be JSON serialized)

    • Optional options: SetOptions

      Optional { skipIfUnchanged } to skip the network write when the value is already stored

    Returns Promise<boolean>