diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-16 15:13:26 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-16 15:13:26 +0200 |
commit | 90a51ab3b9afca0144a93eb967fcd72a230732f0 (patch) | |
tree | 26931e283c36f3dad7212f26e6fbf14a4f57c9be /modules/luci-base/htdocs | |
parent | 3f1d6870ff0b3a0e8e0fc1c63ae2fbee86775261 (diff) |
luci-base: ui.js: add LuCI.ui.menu.flushCache() function
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 57f8e2bff4..6d77f37824 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -2990,6 +2990,14 @@ var UIMenu = baseclass.singleton(/** @lends LuCI.ui.menu.prototype */ { }, /** + * 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 * internal root node if omitted. |