[development] Resetting Drupal's menu cache
Larry Garfield
larry at garfieldtech.com
Fri Jun 27 14:58:03 UTC 2008
In Drupal 5, just truncate cache_menu.
In Drupal 6, you do have to visit the modules page, or go to the Performance page and hit the clear cache button. I tend to find the latter works better.
That said, it sounds from your message like you're editing a core module directly. *Do not do that!* In Drupal 6, use hook_menu_alter() to change the weight of a menu item. Then you can just hit the cache clear button and it will rebuild the menu index.
--Larry Garfield
On Fri, 27 Jun 2008 15:32:52 +0100, Matt Connolly <matt at cabinetuk.com> wrote:
> Hi all,
>
> I've noticed that when you make a change to your MODULE_menu hook,
> that you need to disable and re-enable the module before the changes
> are made effective.
>
> This is fine for my module because I can do that, but I want to make a
> change to a core module (for example, make the weight of Logout 1000
> so it is always at the bottom).
>
> The menu module is a core module and cannot be disabled, so how do I
> reset this menu cache for core modules?
>
>
> -Matt
More information about the development
mailing list