feat: add clearDataInCache method to CacheEnabledApiClient

This commit is contained in:
Shivam Mishra
2026-02-13 16:12:29 +05:30
parent 37da4dd8ca
commit abb5a4c4d8
@@ -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();