Skip to content

Commit 2133ec4

Browse files
authored
Update http_cache.rst
Update CacheKernel implementation in public/index.php Removal of "$request" which was moved to SymfonyRuntime
1 parent 0a9558a commit 2133ec4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

http_cache.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,14 @@ caching kernel:
9898
+ use App\CacheKernel;
9999
use App\Kernel;
100100
101-
// ...
102-
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
101+
// ...
102+
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
103103
+ // Wrap the default Kernel with the CacheKernel one in 'prod' environment
104104
+ if ('prod' === $kernel->getEnvironment()) {
105-
+ $kernel = new CacheKernel($kernel);
105+
+ return new CacheKernel($kernel);
106106
+ }
107+
return $kernel;
107108
108-
$request = Request::createFromGlobals();
109-
// ...
110109
111110
The caching kernel will immediately act as a reverse proxy: caching responses
112111
from your application and returning them to the client.

0 commit comments

Comments
 (0)