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
1 changed files with 8 additions and 0 deletions
|
@ -2989,6 +2989,14 @@ var UIMenu = baseclass.singleton(/** @lends LuCI.ui.menu.prototype */ {
|
||||||
return Promise.resolve(this.menu);
|
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]
|
* @param {LuCI.ui.menu.MenuNode} [node]
|
||||||
* The menu node to retrieve the children for. Defaults to the menu's
|
* The menu node to retrieve the children for. Defaults to the menu's
|
||||||
|
|
Loading…
Reference in a new issue