diff --git a/app/javascript/dashboard/api/CacheEnabledApiClient.js b/app/javascript/dashboard/api/CacheEnabledApiClient.js index 9af939c00..cf61436f1 100644 --- a/app/javascript/dashboard/api/CacheEnabledApiClient.js +++ b/app/javascript/dashboard/api/CacheEnabledApiClient.js @@ -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();