class RouteAccessResponseSubscriber implements EventSubscriberInterface (View source)

Response subscriber to bubble the route's access result's cacheability.

During routing, access checking is performed. The corresponding access result is stored in the Request object's attributes, just like the matching route object is. In case of a cacheable response, the route's access result also determined the content of the response, and therefore the cacheability of the route's access result should also be applied to the resulting response.

Methods

onRespond(ResponseEvent $event)

Bubbles the route's access result' cacheability metadata.

static 
getSubscribedEvents()

{@inheritdoc}

Details

onRespond(ResponseEvent $event)

Bubbles the route's access result' cacheability metadata.

Parameters

ResponseEvent $event

The event to process.

static getSubscribedEvents()

{@inheritdoc}