Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
system_settings_save.patch | 226 bytes | DriesK | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedGood catch. A quick grep learns that this isn't the only place where this is happening:
For the core repository:
For the contributions repository:
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedI don't think any of those extra cache_clear_all() happen very often. But if they did, it would cause a high cache miss ratio ... I looked into this recently.
Comment #3
Dries CreditAttribution: Dries commentedRemoved the redundant
cache_clear_all()
s insystem.module
anduser.module
. Still have to investigate the others. Setting this 'active'.Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedthe locale.inc cache_clean_all() only clears the locale cache.
Contrib needs to look after itself.
Comment #5
(not verified) CreditAttribution: commentedComment #6
(not verified) CreditAttribution: commentedComment #7
(not verified) CreditAttribution: commentedComment #8
(not verified) CreditAttribution: commented