dispatch method

Future<List<String>> dispatch(
  1. ProductInventoryEvent event
)

Handles an inventory event by invalidating affected cache tags atomically.

Implementation

Future<List<String>> dispatch(ProductInventoryEvent event) async {
  final tags = event.affectedCacheTags();
  await cacheStore.deleteByTags(tags);
  return tags;
}