SoulCache

ObserverManager

Internal architecture - Observer coordination and subscription management

ObserverManager (Internal)

Internal Implementation

ObserverManager is an internal class of @soulcache/core. It is not used by QueryClient (which manages QueryObserver instances directly) and it is not exported from the package root. Use QueryClient.subscribe() for the public observation API.

The ObserverManager is a standalone internal module for coordinating observer subscriptions. Notifications are delivered synchronously (they are not batched). QueryClient manages QueryObserver instances directly rather than through the ObserverManager.

Public Alternative

Use QueryClient.subscribe() to observe query updates:

const unsubscribe = client.subscribe(['users'], (snapshot) => {
  console.log(snapshot.data);
  console.log(snapshot.status);
});

On this page