diff options
-rw-r--r-- | CHANGELOG.txt | 3 | ||||
-rw-r--r-- | includes/module.inc | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 48e2119d4..c56694ce8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ Drupal 7.23, xxxx-xx-xx (development version) ----------------------- +- Performance improvement: Allowed all hooks to be included in the + module_implements() cache, even those that are only invoked on HTTP POST + requests. - Made the database system replace truncate queries with delete queries when inside a transaction, to fix issues with PostgreSQL and other databases. - Fixed a bug which caused nested contextual links to display improperly. diff --git a/includes/module.inc b/includes/module.inc index da6dae99c..fe2a9805e 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -834,10 +834,7 @@ function module_hook_info() { */ function module_implements_write_cache() { $implementations = &drupal_static('module_implements'); - // Check whether we need to write the cache. We do not want to cache hooks - // which are only invoked on HTTP POST requests since these do not need to be - // optimized as tightly, and not doing so keeps the cache entry smaller. - if (isset($implementations['#write_cache']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')) { + if (isset($implementations['#write_cache'])) { unset($implementations['#write_cache']); cache_set('module_implements', $implementations, 'cache_bootstrap'); } |