File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Original file line number Diff line number Diff line change @@ -145,12 +145,9 @@ To enable caching, modify the code of a front controller to use the caching
145
145
kernel::
146
146
147
147
// web/app.php
148
- require_once __DIR__.'/../app/bootstrap.php.cache';
149
- require_once __DIR__.'/../app/AppKernel.php';
150
- require_once __DIR__.'/../app/AppCache.php';
151
-
152
148
use Symfony\Component\HttpFoundation\Request;
153
149
150
+ // ...
154
151
$kernel = new AppKernel('prod', false);
155
152
$kernel->loadClassCache();
156
153
// wrap the default AppKernel with the AppCache one
Original file line number Diff line number Diff line change @@ -75,16 +75,18 @@ If you're using the Standard Distribution, this code should already be available
75
75
as comments in this file::
76
76
77
77
// app.php
78
- // ...
79
-
80
- $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
81
78
82
- // Use APC for autoloading to improve performance
83
- // Change 'sf2' by the prefix you want in order
84
- // to prevent key conflict with another application
79
+ // ...
80
+ $loader = require __DIR__.'/../app/autoload.php';
81
+ include_once __DIR__.'/../var/bootstrap.php.cache';
82
+ // Enable APC for autoloading to improve performance.
83
+ // You should change the ApcClassLoader first argument to a unique prefix
84
+ // in order to prevent cache key conflicts with other applications
85
+ // also using APC.
85
86
/*
86
- $loader = new ApcClassLoader('sf2', $loader);
87
- $loader->register(true);
87
+ $apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
88
+ $loader->unregister();
89
+ $apcLoader->register(true);
88
90
*/
89
91
90
92
// ...
@@ -119,7 +121,7 @@ If you're using the Symfony Standard Edition, then you're probably already
119
121
using the bootstrap file. To be sure, open your front controller (usually
120
122
``app.php ``) and check to make sure that the following line exists::
121
123
122
- require_once __DIR__.'/../app /bootstrap.php.cache';
124
+ include_once __DIR__.'/../var /bootstrap.php.cache';
123
125
124
126
Note that there are two disadvantages when using a bootstrap file:
125
127
You can’t perform that action at this time.
0 commit comments