From 140b1ef1a7b110178aebe17334353fa803d2ede7 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 31 Oct 2019 14:20:01 -0400 Subject: #857 flush cache when switching servers --- www/js/LoginCtrl.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'www/js/LoginCtrl.js') diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index cd6861a8..11474f2d 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -594,6 +594,18 @@ function mobilePinConfig () { function saveItems(showalert) { + NVR.flushAPICache() + .then (function() { + _saveItems(showalert); + }) + .catch (function(err) { + NVR.debug ('Error clearing cache:'+JSON.stringify(err)); + _saveItems(showalert); + }); + + } + function _saveItems(showalert) { + //console.log ("*********** SAVE ITEMS CALLED "); //console.log('Saving login'); -- cgit v1.2.3