resetAsync method

Future<void> resetAsync()

Removes all tiles from this store synchronously

Also resets the cache hits & misses statistic.

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

Implementation

Future<void> resetAsync() async {
  final db = _registry(_name);
  await db.writeTxn(() async {
    await db.tiles.clear();
    await db.storeDescriptor.put(
      (await db.descriptor)
        ..hits = 0
        ..misses = 0,
    );
  });
}