Commit 766c804e authored by alexpott's avatar alexpott

Issue #2575841 by nicrodgers, znerol, Utkarsh_Mishra, MerryHamster,...

Issue #2575841 by nicrodgers, znerol, Utkarsh_Mishra, MerryHamster, markdorison: Use proper method name in DynamicPageCacheSubscriber
parent 9f61972e
......@@ -122,7 +122,7 @@ public function __construct(RequestPolicyInterface $request_policy, ResponsePoli
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* The event to process.
*/
public function onRouteMatch(GetResponseEvent $event) {
public function onRequest(GetResponseEvent $event) {
// Don't cache the response if the Dynamic Page Cache request policies are
// not met. Store the result in a static keyed by current request, so that
// onResponse() does not have to redo the request policy check.
......@@ -189,7 +189,7 @@ public function onResponse(FilterResponseEvent $event) {
// Don't cache the response if the Dynamic Page Cache request & response
// policies are not met.
// @see onRouteMatch()
// @see onRequest()
if ($this->requestPolicyResults[$request] === RequestPolicyInterface::DENY || $this->responsePolicy->check($response, $request) === ResponsePolicyInterface::DENY) {
return;
}
......@@ -312,7 +312,7 @@ public static function getSubscribedEvents() {
// should not be polluted by maintenance mode-specific behavior; priority
// 30), but before ContentControllerSubscriber (updates _controller, but
// that is a no-op when Dynamic Page Cache runs; priority 25).
$events[KernelEvents::REQUEST][] = ['onRouteMatch', 27];
$events[KernelEvents::REQUEST][] = ['onRequest', 27];
// Run before HtmlResponseSubscriber::onRespond(), which has priority 0.
$events[KernelEvents::RESPONSE][] = ['onResponse', 100];
......
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