luci-base: ui.js: add LuCI.ui.menu.flushCache() function
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
3f1d6870ff
commit
90a51ab3b9
@ -2989,6 +2989,14 @@ var UIMenu = baseclass.singleton(/** @lends LuCI.ui.menu.prototype */ {
|
||||
return Promise.resolve(this.menu);
|
||||
},
|
||||
|
||||
/**
|
||||
* Flush the internal menu cache to force loading a new structure on the
|
||||
* next page load.
|
||||
*/
|
||||
flushCache: function() {
|
||||
session.setLocalData('menu', null);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {LuCI.ui.menu.MenuNode} [node]
|
||||
* The menu node to retrieve the children for. Defaults to the menu's
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user