Commit 1187f773 authored by catch's avatar catch
Browse files

Issue #1860876: module_implements_write_cache() should not drop caches when...

Issue #1860876: module_implements_write_cache() should not drop caches when requesting with POST method
parent 99f7e594
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment