diff --git a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php index d2e1078..5f5d689 100644 --- a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php @@ -43,11 +43,7 @@ function __construct(ModuleHandlerInterface $module_handler) { */ public function onTerminate(PostResponseEvent $event) { $request_method = $event->getRequest()->getMethod(); - // Check whether we need to write the module implementations 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 (($request_method == 'GET' || $request_method == 'HEAD') && $this->moduleHandler instanceof CachedModuleHandlerInterface) { + if ($this->moduleHandler instanceof CachedModuleHandlerInterface) { $this->moduleHandler->writeCache(); } system_run_automated_cron();