feat: add clearDataInCache method to CacheEnabledApiClient
This commit is contained in:
@@ -84,6 +84,15 @@ class CacheEnabledApiClient extends ApiClient {
|
||||
return response;
|
||||
}
|
||||
|
||||
async clearDataInCache() {
|
||||
try {
|
||||
await this.dataManager.initDb();
|
||||
this.dataManager.db.clear(this.cacheModelName);
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
}
|
||||
|
||||
async validateCacheKey(cacheKeyFromApi) {
|
||||
if (!this.dataManager.db) {
|
||||
await this.dataManager.initDb();
|
||||
|
||||
Reference in New Issue
Block a user