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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user