SmartCache constructor

SmartCache({
  1. required CacheStrategy cache,
  2. required String queueDir,
  3. required WsChannel wsChannel,
  4. bool enableCompression = true,
})

Implementation

SmartCache({
  required CacheStrategy cache,
  required String queueDir,
  required WsChannel wsChannel,
  this.enableCompression = true,
}) : _disk = cache,
     _wsChannel = wsChannel,
     _queuePath = '$queueDir/offline_queue.json' {
  _setupSyncListener();
  _setupConnectionListener();
  _loadCompleter = Completer<void>();
  _loadQueueAsync();
}