CacheStrategy<V> constructor

CacheStrategy<V>({
  1. required int maxSize,
  2. String? cacheKey,
  3. Duration? expiration,
  4. V fromJson(
    1. Map<String, dynamic> json
    )?,
  5. Map<String, dynamic> toJson(
    1. V value
    )?,
  6. CacheMode mode = CacheMode.persistent,
  7. bool autoRegister = true,
})

Implementation

CacheStrategy({
  required this.maxSize,
  this.cacheKey,
  this.expiration,
  this.fromJson,
  this.toJson,
  this.mode = CacheMode.persistent,
  this.autoRegister = true,
}) {
  _validateParams();
  _initCaches();
  _autoRegister();
}