cache method

OffsetIterator<T> cache({
  1. required String key,
  2. required Map<String, dynamic> cache,
  3. bool equals(
    1. T prev,
    2. T next
    )?,
  4. SeedCallback<T>? fallbackSeed,
  5. int retention = 0,
  6. String name = 'cache',
  7. bool? cancelOnError,
  8. bool bubbleCancellation = true,
})

Implementation

OffsetIterator<T> cache({
  required String key,
  required Map<String, dynamic> cache,
  bool Function(T prev, T next)? equals,
  SeedCallback<T>? fallbackSeed,
  int retention = 0,
  String name = 'cache',
  bool? cancelOnError,
  bool bubbleCancellation = true,
}) =>
    persist(
      cache: cache,
      storage: NullStorage(),
      key: key,
      fromJson: (val) => null as T,
      toJson: (p0) => null,
      fallbackSeed: fallbackSeed,
      retention: retention,
      name: name,
      equals: equals,
      cancelOnError: cancelOnError,
      bubbleCancellation: bubbleCancellation,
    );