File tree
Expand file treeCollapse file tree1 file changed
+9
-4
lines changed Expand file treeCollapse file tree1 file changed
+9
-4
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -95,14 +95,19 @@ caching kernel:
|
95 | 95 |
|
96 | 96 | // public/index.php
|
97 | 97 |
|
98 |
| -use App\Kernel; |
99 | 98 | + use App\CacheKernel;
|
| 99 | +use App\Kernel; |
100 | 100 |
|
101 | 101 | // ...
|
102 |
| -$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))); |
| 102 | +$env = $_SERVER['APP_ENV'] ?? 'dev'; |
| 103 | +$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)); |
| 104 | +// ... |
| 105 | +$kernel = new Kernel($env, $debug); |
103 | 106 |
|
104 |
| -+ // Wrap the default Kernel with the CacheKernel one |
105 |
| -+ $kernel = new CacheKernel($kernel); |
| 107 | ++ // Wrap the default Kernel with the CacheKernel one in 'prod' environment |
| 108 | ++ if ('prod' === $env) { |
| 109 | ++ $kernel = new CacheKernel($kernel); |
| 110 | ++ } |
106 | 111 |
|
107 | 112 | $request = Request::createFromGlobals();
|
108 | 113 | // ...
|
|
You can’t perform that action at this time.
0 commit comments