File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -98,15 +98,14 @@ caching kernel:
98
98
+ use App\CacheKernel;
99
99
use App\Kernel;
100
100
101
- // ...
102
- $kernel = new Kernel($_SERVER ['APP_ENV'], (bool) $_SERVER ['APP_DEBUG']);
101
+ // ...
102
+ $kernel = new Kernel($context ['APP_ENV'], (bool) $context ['APP_DEBUG']);
103
103
+ // Wrap the default Kernel with the CacheKernel one in 'prod' environment
104
104
+ if ('prod' === $kernel->getEnvironment()) {
105
- + $kernel = new CacheKernel($kernel);
105
+ + return new CacheKernel($kernel);
106
106
+ }
107
+ return $kernel;
107
108
108
- $request = Request::createFromGlobals();
109
- // ...
110
109
111
110
The caching kernel will immediately act as a reverse proxy: caching responses
112
111
from your application and returning them to the client.
You can’t perform that action at this time.
0 commit comments