removeAll

suspend fun <T : Model> removeAll(collection: MongoCollection<T>, deleteData: suspend MongoCollection<T>.() -> Boolean): Boolean

Delete all the items in a collection, if that was successful return true or false if true all the items in the cache will also be deleted e.g

kacheController.removeAll(collection) {
collection.deleteMany(Filters.empty()).deletedCount 0
}

ensure that you use the delete count instead of wasAcknowledged() because that will still be true when no items are deleted