You are here

class DenyBigPipeSessionlessResponses in Sessionless BigPipe 8

Same name and namespace in other branches
  1. 2.x src/PageCache/ResponsePolicy/DenyBigPipeSessionlessResponses.php \Drupal\big_pipe_sessionless\PageCache\ResponsePolicy\DenyBigPipeSessionlessResponses

A policy denying caching of a BigPipe sessionless responses.

Hierarchy

Expanded class hierarchy of DenyBigPipeSessionlessResponses

1 string reference to 'DenyBigPipeSessionlessResponses'
big_pipe_sessionless.services.yml in ./big_pipe_sessionless.services.yml
big_pipe_sessionless.services.yml
1 service uses DenyBigPipeSessionlessResponses
page_cache_deny_big_pipe_sessionless in ./big_pipe_sessionless.services.yml
Drupal\big_pipe_sessionless\PageCache\ResponsePolicy\DenyBigPipeSessionlessResponses

File

src/PageCache/ResponsePolicy/DenyBigPipeSessionlessResponses.php, line 13

Namespace

Drupal\big_pipe_sessionless\PageCache\ResponsePolicy
View source
class DenyBigPipeSessionlessResponses implements ResponsePolicyInterface {

  /**
   * {@inheritdoc}
   */
  public function check(Response $response, Request $request) {
    if ($response instanceof BigPipeResponse) {
      return static::DENY;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DenyBigPipeSessionlessResponses::check public function Determines whether it is save to store a page in the cache. Overrides ResponsePolicyInterface::check
ResponsePolicyInterface::DENY constant Deny storage of a page in the cache.