diff options
Diffstat (limited to 'src/api/server')
-rw-r--r-- | src/api/server/LocalApi.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/api/server/LocalApi.js b/src/api/server/LocalApi.js index 2d9af416f..cc8035523 100644 --- a/src/api/server/LocalApi.js +++ b/src/api/server/LocalApi.js | |||
@@ -41,17 +41,14 @@ export default class LocalApi { | |||
41 | }); | 41 | }); |
42 | } | 42 | } |
43 | 43 | ||
44 | async clearCache(serviceId) { | 44 | async clearCache(serviceId = null) { |
45 | const s = session.fromPartition(`persist:service-${serviceId}`); | 45 | const s = serviceId ? session.fromPartition(`persist:service-${serviceId}`) : session.defaultSession; |
46 | 46 | ||
47 | debug('LocalApi::clearCache resolves', serviceId); | 47 | debug('LocalApi::clearCache resolves', (serviceId || 'clearAppCache')); |
48 | return s.clearCache(); | 48 | await s.clearStorageData({ |
49 | } | 49 | storages: ['appcache', 'cookies', 'filesystem', 'indexdb', 'localstorage', 'shadercache', 'websql', 'serviceworkers', 'cachestorage'], |
50 | 50 | quotas: ['temporary', 'persistent', 'syncable'], | |
51 | async clearAppCache() { | 51 | }); |
52 | const s = session.defaultSession; | ||
53 | |||
54 | debug('LocalApi::clearCache clearAppCache'); | ||
55 | return s.clearCache(); | 52 | return s.clearCache(); |
56 | } | 53 | } |
57 | } | 54 | } |