class WebformUncacheableResponse in Webform 8.5
Same name and namespace in other branches
- 6.x src/Routing/WebformUncacheableResponse.php \Drupal\webform\Routing\WebformUncacheableResponse
 
Provides an uncacheable response.
Hierarchy
- class \Drupal\webform\Routing\WebformUncacheableResponse extends \Symfony\Component\HttpFoundation\Response
 
Expanded class hierarchy of WebformUncacheableResponse
1 file declares its use of WebformUncacheableResponse
- WebformEntityController.php in src/
Controller/ WebformEntityController.php  
File
- src/
Routing/ WebformUncacheableResponse.php, line 10  
Namespace
Drupal\webform\RoutingView source
class WebformUncacheableResponse extends Response {
  /**
   * {@inheritdoc}
   */
  public function __construct($url, $status = 302, $headers = []) {
    parent::__construct($url, $status, $headers);
    $this
      ->setPrivate();
    $this
      ->setMaxAge(0);
    $this
      ->setSharedMaxAge(0);
    $this->headers
      ->addCacheControlDirective('must-revalidate', TRUE);
    $this->headers
      ->addCacheControlDirective('no-store', TRUE);
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            WebformUncacheableResponse:: | 
                  public | function | Constructor. |