michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"]; michael@0: michael@0: Components.utils.import('resource://gre/modules/LoadContextInfo.jsm'); michael@0: michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: michael@0: this.OfflineAppCacheHelper = { michael@0: clear: function() { michael@0: var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService); michael@0: var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null); michael@0: try { michael@0: appCacheStorage.asyncEvictStorage(null); michael@0: } catch(er) {} michael@0: } michael@0: };