updateCacheBySingleKey<T> method

void updateCacheBySingleKey<T>(
  1. String key,
  2. T value, {
  3. List<String>? tags,
  4. bool emitEvent = true,
})

Single key update

Implementation

void updateCacheBySingleKey<T>(
  String key,
  T value, {
  List<String>? tags,
  bool emitEvent = true,
}) {
  _cacheStorage.addToCache<T>(key, value, tags: tags);

  if (emitEvent) {
    _mutationController.add(
      CacheMutationEvent(mutatedKeys: [key], mutatedData: {key: value}),
    );
  }
}