CacheManager<T>.justCache constructor

CacheManager<T>.justCache({
  1. required String key,
  2. required SerializerFunc serializerFunc,
  3. int? ttlValue,
})

Implementation

CacheManager.justCache(
    {required String key, required SerializerFunc serializerFunc, int? ttlValue}) {
  _strategyBuilder = StrategyBuilder<T>(key, sotrageImplimentation)
      .withAsync((){})
      .withSerializer(serializerFunc)
      .withStrategy(JustCacheStrategy());
  if (ttlValue != null) {
    _strategyBuilder.withTtl(ttlValue);
  }
}