Skip to content

Commit 821d39a

Browse files
committed
Merge pull request symfony#590 from mgiagnoni/fix-http-cache
[book][http_cache] Updated front controller code
2 parents 7a81924 + dc6a5dc commit 821d39a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

book/http_cache.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ kernel::
145145

146146
// web/app.php
147147

148-
require_once __DIR__.'/../app/bootstrap_cache.php.cache';
148+
require_once __DIR__.'/../app/bootstrap.php.cache';
149+
require_once __DIR__.'/../app/AppKernel.php';
149150
require_once __DIR__.'/../app/AppCache.php';
150151

151152
use Symfony\Component\HttpFoundation\Request;
152153

154+
$kernel = new AppKernel('prod', false);
155+
$kernel->loadClassCache();
153156
// wrap the default AppKernel with the AppCache one
154-
$kernel = new AppCache(new AppKernel('prod', false));
157+
$kernel = new AppCache($kernel);
155158
$kernel->handle(Request::createFromGlobals())->send();
156159

157160
The caching kernel will immediately act as a reverse proxy - caching responses

0 commit comments

Comments
 (0)