From cadd940917efc18715172ee29b9c8128affcddaa Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Mon, 5 Aug 2013 21:32:02 -0400 Subject: Issue #1860876 by pounard: Fixed module_implements_write_cache() should not drop caches when requesting with POST method. --- includes/module.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'includes') 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'); } -- cgit v1.2.3