CacheManager<T>.justAsync constructor

CacheManager<T>.justAsync({
  1. required String key,
  2. required AsyncFunc<T> asyncBloc,
  3. int? ttlValue,
})

Implementation

CacheManager.justAsync(
    {required String key, required AsyncFunc<T> asyncBloc, int? ttlValue}) {
  _strategyBuilder = StrategyBuilder<T>(key, sotrageImplimentation)
      .withAsync(asyncBloc)
      .withSerializer((p0) {})
      .withStrategy(JustAsyncStrategy());
  if (ttlValue != null) {
    _strategyBuilder.withTtl(ttlValue);
  }
}