[drupal-devel] [bug] redundant function call in system_settings_save()

Dries drupal-devel at drupal.org
Wed Jul 20 15:10:48 UTC 2005


Issue status update for 
http://drupal.org/node/27131
Post a follow up: 
http://drupal.org/project/comments/add/27131

 Project:      Drupal
 Version:      cvs
 Component:    system.module
 Category:     bug reports
 Priority:     minor
 Assigned to:  Anonymous
 Reported by:  DriesK
 Updated by:   Dries
 Status:       patch

Good catch.  A quick grep learns that this isn't the only place where
this is happening:


For the core repository:



$ grep -a4 -r menu_rebuild * | grep cache_clear | grep -v menu.inc
includes/locale.inc-  cache_clear_all("locale:$lang");
modules/system.module-    cache_clear_all();
modules/system.module-  cache_clear_all();
modules/user.module-    cache_clear_all();

For the contributions repository:



$ grep -a4 -r menu_rebuild * | grep cache_clear
ecommerce/cart/cart.module-  cache_clear_all();
sections/sections.module-      cache_clear_all();
sections/sections.module-      cache_clear_all();



Dries



Previous comments:
------------------------------------------------------------------------

Wed, 20 Jul 2005 13:26:20 +0000 : DriesK

Attachment: http://drupal.org/files/issues/system_settings_save.patch (226 bytes)

system_settings_save() first calls cache_clear_all(), immediately
followed by menu_rebuild(). However, the first function which is called
by menu_rebuild(), is cache_clear_all(), so removing the first call
means less db-queries.
Patch (tiny one) attached.







More information about the drupal-devel mailing list