summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-08-05 21:32:02 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-08-05 21:32:02 -0400
commitcadd940917efc18715172ee29b9c8128affcddaa (patch)
treef4199b770af5938546384d05bbd06406f1111479 /includes
parent2df0b841f5a6794ff961033ff21f6d3d7a181b2b (diff)
downloadbrdo-cadd940917efc18715172ee29b9c8128affcddaa.tar.gz
brdo-cadd940917efc18715172ee29b9c8128affcddaa.tar.bz2
Issue #1860876 by pounard: Fixed module_implements_write_cache() should not drop caches when requesting with POST method.
Diffstat (limited to 'includes')
-rw-r--r--includes/module.inc5
1 files changed, 1 insertions, 4 deletions
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');
}