@@ -50,6 +50,7 @@ class GraphQl
50
50
/**
51
51
* @param CacheableQuery $cacheableQuery
52
52
* @param Config $config
53
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
53
54
* @param ResponseHttp $response @deprecated do not use
54
55
* @param HttpRequestProcessor $requestProcessor
55
56
* @param Registry $registry
@@ -103,12 +104,10 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
103
104
/** @see \Magento\Framework\App\Http::launch */
104
105
/** @see \Magento\PageCache\Model\Controller\Result\BuiltinPlugin::afterRenderResult */
105
106
$ this ->registry ->register ('use_page_cache_plugin ' , true , true );
106
-
107
107
$ cacheId = $ this ->cacheIdCalculator ->getCacheId ();
108
108
if ($ cacheId ) {
109
109
$ response ->setHeader (CacheIdCalculator::CACHE_ID_HEADER , $ cacheId , true );
110
110
}
111
-
112
111
if ($ this ->cacheableQuery ->shouldPopulateCacheHeadersWithTags ()) {
113
112
$ response ->setPublicHeaders ($ this ->config ->getTtl ());
114
113
$ response ->setHeader ('X-Magento-Tags ' , implode (', ' , $ this ->cacheableQuery ->getCacheTags ()), true );
@@ -118,11 +117,9 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
118
117
} else {
119
118
$ sendNoCacheHeaders = true ;
120
119
}
121
-
122
120
if ($ sendNoCacheHeaders ) {
123
- $ response ->setNoCacheHeaders ();
121
+ $ response ->setNoCacheHeaders ();
124
122
}
125
-
126
123
return $ result ;
127
124
}
128
125
}
0 commit comments