For better readability add comments per block / bulk of code, as in:

```php
+        $response = new Response();
+
+        // Setting default cache configuration (you can override it in you siteaccess config)
+        $response->setSharedMaxAge( $this->getConfigResolver()->getParameter( 'content.default_ttl' ) );
+
+        // Make the response location cache aware for the reverse proxy
```