registerCachedFactoryParamAsync<T extends Object, P1, P2> abstract method

void registerCachedFactoryParamAsync<T extends Object, P1, P2>(
  1. FactoryFuncParamAsync<T, P1?, P2?> factoryFunc, {
  2. String? instanceName,
})

Like registerFactoryParamAsync but holds a weak reference to the last created instance if the instance wasn't garbage collected yet, and if the passed parameter haven't changed, it will return this instance instead of creating a new one

Implementation

void registerCachedFactoryParamAsync<T extends Object, P1, P2>(
  FactoryFuncParamAsync<T, P1?, P2?> factoryFunc, {
  String? instanceName,
});