reset method

void reset()

Removes all tiles from this store asynchronously

Also resets the cache hits & misses statistic.

Prefer resetAsync to avoid blocking the UI thread. Otherwise, this has slightly better performance.

This method requires the store to be ready, else an FMTCStoreNotReady error will be raised.

Implementation

void reset() {
  final db = _registry(_name);
  db.writeTxnSync(() {
    db.tiles.clearSync();
    db.storeDescriptor.putSync(
      db.descriptorSync
        ..hits = 0
        ..misses = 0,
    );
  });
}