updateCache<T> method

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

Implementation

void updateCache<T>(
  String key,
  T Function(T?) updater, {
  List<String>? tags,
  bool emitEvent = true,
}) {
  _cacheMutator.updateCacheBySingleKey<T>(
    key,
    updater(_cacheStorage.getValue(key)),
    tags: tags,
    emitEvent: emitEvent,
  );
}