CacheBinding<T> extension

Binds a SignalSlice<T> to the CacheObserver for automatic cross-view state synchronization.

When the cache emits an update for type T, the slice's SignalResult is updated automatically — no network re-fetch.

// In generated DomainState:
final product = bind<Product>('product', getProductUseCase, params)
  ..bindCache(); // auto-generated for @Cacheable entities
on

Methods

bindCache() → SignalSubscription

Available on SignalSlice<T>, provided by the CacheBinding extension

Subscribe this slice to cache updates for type T.