Cache constructor

Cache(
  1. {Store? store,
  2. DataIdResolver? dataIdFromObject,
  3. Map<String, TypePolicy> typePolicies = const {},
  4. Map<String, Set<String>> possibleTypes = const {},
  5. bool addTypename = true,
  6. Map<OperationRequest, Map<String, Map<String, dynamic>?>> seedOptimisticPatches = const {},
  7. JsonEquals? jsonEquals}
)

Implementation

Cache({
  Store? store,
  this.dataIdFromObject,
  this.typePolicies = const {},
  this.possibleTypes = const {},
  this.addTypename = true,
  Map<OperationRequest, Map<String, Map<String, dynamic>?>>
      seedOptimisticPatches = const {},
  JsonEquals? jsonEquals,
})  : store = store ?? MemoryStore(),
      _eventStream = BehaviorSubject.seeded(null),
      optimisticPatchesStream = BehaviorSubject.seeded(seedOptimisticPatches),
      jsonEquals = jsonEquals ?? jsonMapEquals;