Menu bar does not change to match UCI depends

Hi, I'm learning the new LuCI framework using JS and come across interesting idea of "depends" in each menu.d/*.json. I tried to modify a menu node to depend on specific value of uci option, for example, hostnames to depends on dhcp.lan.ignore=1 as follow:

	"admin/network/hosts": {
		"title": "Hostnames",
		"order": 40,
		"action": {
			"type": "view",
			"path": "network/hosts"
		},
		"depends": {
			"acl": [
				"luci-mod-network-dhcp"
			],
			"uci": {
				"dhcp": {
					"lan": {
						"ignore": "1"
					}
				}
			}
		}
	},

I 've tried to change the ignore value by configuration of DHCP Server in LAN interface. After the value is changed to 1, the Hostnames node still appear in menu bar until I manually remove luci caches in /tmp. Just want to ask what I'm missing here or what should I add/fix to make menu bar depends changes immediately after option values matched.

There is no way to make the menu immediately change since it is cached both server- and client side. The uci depends are mainly intended to be used for disabling menu points based on system features (e.g. only show swconfig switch menu if a config switch section exists), not for real time menu manipulation.

Thanks @jow ! Can you please suggest a solution to deal with this requirement? If I can't hide menu bar immediately, how about add an "onclick" event to prevent users to access the pages. I can't come up with any good idea to do so.