Skip to main content
Version: Next

StorageInstanceManager

Unified manager for opening and caching storage instances (Dataset, KeyValueStore, RequestQueue).

A single instance manages all storage types. Instances are cached by (storageClass, id/name/alias, backendCacheKey) so the same storage is never opened twice.

The manager itself does not resolve identifiers — callers pass explicit id, name, or alias (at most one), and a pre-bound backendOpener promise. When none of id, name, alias are provided, the manager automatically assigns a reserved default alias.

Index

Constructors

constructor

Methods

clearCache

  • clearCache(): void
  • Clear the entire cache. Also calls clearCache() on any cached KeyValueStore instances (duck-typed to avoid importing KeyValueStore and circular dependencies). Called during service locator reset.


    Returns void

openStorage

  • openStorage<TStorage>(cls, __namedParameters): Promise<TStorage>
  • Open (or retrieve from cache) a storage instance.


    Parameters

    Returns Promise<TStorage>

removeFromCache

  • removeFromCache(instance): void
  • Remove a storage instance from the cache (called from storage.drop()).


    Parameters

    Returns void