[support] How to disable the menu cache on Drupal 7

sumeet pareek positivecharge at gmail.com
Thu Jan 12 13:19:53 UTC 2012


How about adding this in hook_init() of any module -
http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_rebuild/7
That should do it.

On Thu, Jan 12, 2012 at 6:35 PM, DTH <david at hartster.org> wrote:

> I'm developing a custom module. This means adding lots of things via
> hook_menu. Every time I add a new menu item, I need to clear all
> caches via the Performance page. Is there anyway to prevent this data
> being cached in the first place?
>
> This is what's currently in my settings.php file:
>
> if (!class_exists('DrupalFakeCache')) {
>  $conf['cache_backends'][] = 'includes/cache-install.inc';
> }
> // Default to throwing away cache data
> $conf['cache_default_class'] = 'DrupalFakeCache';
> // Rely on the DB cache for form caching - otherwise forms fail.
> $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
>
> Anything else I can do to easily clear/rebuild the menu automatically
> during development?
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Sumeet Pareek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120112/f77987d0/attachment.html 


More information about the support mailing list