clear method
Remove everything from storage.
Setting rebuildDb
to true
will clean up the SQL database and free up
the space.
Implementation
@override
Future<void> clear({bool rebuildDb = false}) async {
final db = await _getDb();
await db.delete(_cacheTable);
if (rebuildDb) await db.execute('vacuum');
}