Skip to content
Snippets Groups Projects
Select Git revision
  • 29b6d6002cc7730c7a6e3dc4b1c1f05702ab97ae
  • 7.x-3.x default
  • 7.x-4.x
  • 3353492-drupal-10-support
  • bug/files-import
  • detached
  • release/7.x-4.0-beta2
  • 7.x-5.x
  • 4.2.x
  • feature/no-platforms
  • 7.x-4.x-verify-works
  • 2953349-drush9-composer
  • 4.1.x
  • 4.x-php81
  • feature/php/8.1
  • php81
  • 7.x-4.1.x
  • 3254372-ci_updates_for_focal_and_bullseye
  • 7.x-3.20.x
  • 7.x-3.19.x
  • 2708727-site-install-fail-errors
  • 7.x-4.0-beta19
  • 7.x-4.0-beta18
  • 7.x-4.0-beta17
  • 7.x-4.0-beta16
  • 7.x-4.0-beta15
  • 7.x-4.0-beta14
  • 7.x-4.0-beta13
  • 7.x-4.0-beta12
  • 7.x-4.0-beta11
  • 7.x-4.0-beta10
  • 7.x-4.0-beta9
  • 7.x-4.0-beta8
  • 7.x-4.0-beta7
  • 7.x-4.0-beta6
  • 7.x-4.0-beta5
  • 7.x-4.0-beta4
  • 7.x-4.0-beta3
  • 7.x-4.0-beta2
  • 7.x-4.0-beta1
  • 7.x-3.192
41 results

example.sudoers

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    PageCache.php 13.95 KiB
    <?php
    
    namespace Drupal\page_cache\StackMiddleware;
    
    use Drupal\Core\Cache\Cache;
    use Drupal\Core\Cache\CacheableResponseInterface;
    use Drupal\Core\Cache\CacheBackendInterface;
    use Drupal\Core\PageCache\RequestPolicyInterface;
    use Drupal\Core\PageCache\ResponsePolicyInterface;
    use Drupal\Core\Site\Settings;
    use Symfony\Component\HttpFoundation\BinaryFileResponse;
    use Symfony\Component\HttpFoundation\Request;
    use Symfony\Component\HttpFoundation\Response;
    use Symfony\Component\HttpFoundation\StreamedResponse;
    use Symfony\Component\HttpKernel\HttpKernelInterface;
    
    /**
     * Executes the page caching before the main kernel takes over the request.
     */
    class PageCache implements HttpKernelInterface {
    
      /**
       * The wrapped HTTP kernel.
       *
       * @var \Symfony\Component\HttpKernel\HttpKernelInterface
       */
      protected $httpKernel;
    
      /**
       * The cache bin.
       *
       * @var \Drupal\Core\Cache\CacheBackendInterface
       */
      protected $cache;
    
      /**
       * A policy rule determining the cacheability of a request.
       *
       * @var \Drupal\Core\PageCache\RequestPolicyInterface
       */
      protected $requestPolicy;
    
      /**
       * A policy rule determining the cacheability of the response.
       *
       * @var \Drupal\Core\PageCache\ResponsePolicyInterface
       */
      protected $responsePolicy;
    
      /**
       * The cache ID for the (master) request.
       *
       * @var string
       */
      protected $cid;
    
      /**
       * Constructs a PageCache object.
       *
       * @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
       *   The decorated kernel.
       * @param \Drupal\Core\Cache\CacheBackendInterface $cache
       *   The cache bin.
       * @param \Drupal\Core\PageCache\RequestPolicyInterface $request_policy
       *   A policy rule determining the cacheability of a request.
       * @param \Drupal\Core\PageCache\ResponsePolicyInterface $response_policy
       *   A policy rule determining the cacheability of the response.
       */
      public function __construct(HttpKernelInterface $http_kernel, CacheBackendInterface $cache, RequestPolicyInterface $request_policy, ResponsePolicyInterface $response_policy) {
        $this->httpKernel = $http_kernel;