removeByKey method
Remove data from cache by key
.
Provide the same key
that you used when adding the data to remove
data from cache. This will remove all data withe the provided key
.
Setting rebuildDb
to true
will clean up the SQL database and free up
the space.
Implementation
Future<void> removeByKey(String key, {bool rebuildDb = false}) async {
if (config.useMemCache) _memCache.removeByKey(key);
await dataStore.removeByKey(key, rebuildDb: rebuildDb);
}