1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 19:45:46 +01:00

Flush literals from cache on :rehash.

This commit is contained in:
Kris Maglione
2014-02-17 14:33:00 -08:00
parent 48177b7405
commit 512b01d574
3 changed files with 19 additions and 4 deletions

View File

@@ -138,9 +138,15 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
}
}),
flush: function flush() {
this.storage.clear();
this.flushDiskCache();
flush: function flush(filter) {
if (filter) {
this.storage.keys().filter(filter)
.forEach(bind("remove", this.storage));
}
else {
this.storage.clear();
this.flushDiskCache();
}
},
flushDiskCache: function flushDiskCache() {