StorageInstanceManager
Index
Constructors
Methods
Constructors
constructor
Returns StorageInstanceManager
Methods
clearCache
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
Open (or retrieve from cache) a storage instance.
Parameters
cls: Constructor<TStorage>
The storage class constructor (e.g.
Dataset,KeyValueStore,RequestQueue).__namedParameters: ExplicitStorageIdentifier | DefaultStorageIdentifier & { backendCacheKey: string; backendOpener: () => Promise<DatasetBackend<Dictionary> | KeyValueStoreBackend | RequestQueueBackend> }
Returns Promise<TStorage>
removeFromCache
Remove a storage instance from the cache (called from
storage.drop()).Parameters
instance: IStorage
Returns void
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, oralias(at most one), and a pre-boundbackendOpenerpromise. When none ofid,name,aliasare provided, the manager automatically assigns a reserved default alias.