FirmwareCache: naming fixes

10.3.x-maintenance
Kiripolszky Károly 2018-05-10 19:09:52 +02:00
parent e432d8656d
commit b18a98299b
2 changed files with 4 additions and 4 deletions

View File

@ -172,7 +172,7 @@ let FirmwareCache = (function () {
/**
* Remove all cached data
*/
function destroy() {
function invalidate() {
if (!journalLoaded) {
console.warn("Cache journal not yet loaded");
return undefined;
@ -240,10 +240,10 @@ let FirmwareCache = (function () {
load: () => {
JournalStorage.load(onEntriesLoaded);
},
flush: () => {
unload: () => {
JournalStorage.persist(journal.toJSON());
journal.clear();
},
destroy: destroy,
invalidate: invalidate,
};
})();

View File

@ -545,7 +545,7 @@ TABS.firmware_flasher.initialize = function (callback) {
TABS.firmware_flasher.cleanup = function (callback) {
PortHandler.flush_callbacks();
FirmwareCache.flush();
FirmwareCache.unload();
// unbind "global" events
$(document).unbind('keypress');