JsonCacheMem.mem constructor

JsonCacheMem.mem(
  1. Map<String, Map<String, dynamic>?> mem, {
  2. JsonCache? level2,
  3. ReadWriteMutex? mutex,
})

Cache with an external memory and an optional custom mutex.

Note: the memory mem will not be copied deeply.

Implementation

JsonCacheMem.mem(
  Map<String, Map<String, dynamic>?> mem, {
  JsonCache? level2,
  ReadWriteMutex? mutex,
})  : _memory = mem,
      _level2 = level2 ?? const JsonCacheHollow(),
      _mutex = mutex ?? ReadWriteMutex();