onWillGet method

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

Custom logic to be executed before a Cache.get or Cache.getAsync.

Implementation

@override
void onWillGet(TIdentifier id) {
  _count[id] = _count.putIfAbsent(id, () => 0) + 1;
}