onWillRelease method

  1. @override
void onWillRelease(
  1. TIdentifier id
)
override

Custom logic to be executed before a Cache.release.

Implementation

@override
void onWillRelease(TIdentifier id) {
  final count = _count[id];
  if (count != null && count > 0) {
    _count[id] = count - 1;
  }
}