I am writing a drupal 6, custom module, the page that I am calling in hook_menu is giving me a page not found error or it is displaying empty page without any content.
please tell me how do I clear the menu cache?
lot of forums say that devel module has a link to clear menu cache. but I couldn't figure out one.
Please help me how do I clear Menu cache?
I cant go forward without seeing the page content.
your help is greatly valued

Comments

cog.rusty’s picture

Probably menu_rebuild()
That runs menu_cache_clear_all(), among a few other things.

egomac’s picture

/**
 * Implementation of hook_flush_caches().
 *
 * Flush client-side caches.
 */
function yourmodule_flush_caches() {
  cache_clear_all('*', 'cache_menu', TRUE);
}

Then to flush it manually inside your code, just call the function yourmodule_flush_caches;

Jaypan’s picture

admin -> settings -> performance

Click 'clear cache'.

Develop module: you need to enable the 'development' block. The link lies in that block.

Hemu’s picture

Thank you for your response.I have the devel module enabled. Can you please give me the navigation where the link lies.
I tried searching all over the admin menu. but no luck.
Please help

Jaypan’s picture

you need to enable the 'development' block. The link lies in that block.

Hemu’s picture

Jay, Thanks for your help

corbacho’s picture

Did you try hovering over the favicon in the top-left bar of admin menu ?

brendanxc’s picture

You can also go to /devel/menu/reset if devel is enabled.

zeropaper’s picture

Alternatively, if you are on a production site, don't want to clear all caches, don't have the devel module and have access to a PHPMyAdmin you can simply truncate (empty) the cache_menu table.

peps_cyd’s picture

I should point out, as cog.rusty already said, that the easiest way to programmatically rebuild menu in Drupal 6 is to use the built-in method menu_rebuild() directly in your module's functions.

It clears the menu_cache table and rebuild all your menus.

Sincerely,
CYD