Skip to content

Commit

Permalink
app/bootstrap.php.cache -> var/bootstrap.php.cache
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Nov 28, 2015
1 parent 3318f2e commit 6b5c977
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
5 changes: 1 addition & 4 deletions book/http_cache.rst
Expand Up @@ -145,12 +145,9 @@ To enable caching, modify the code of a front controller to use the caching
kernel::

// web/app.php
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
require_once __DIR__.'/../app/AppCache.php';

use Symfony\Component\HttpFoundation\Request;

// ...
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
// wrap the default AppKernel with the AppCache one
Expand Down
20 changes: 11 additions & 9 deletions book/performance.rst
Expand Up @@ -75,16 +75,18 @@ If you're using the Standard Distribution, this code should already be available
as comments in this file::

// app.php
// ...

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance
// Change 'sf2' by the prefix you want in order
// to prevent key conflict with another application
// ...
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../var/bootstrap.php.cache';
// Enable APC for autoloading to improve performance.
// You should change the ApcClassLoader first argument to a unique prefix
// in order to prevent cache key conflicts with other applications
// also using APC.
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
$apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
$loader->unregister();
$apcLoader->register(true);
*/

// ...
Expand Down Expand Up @@ -119,7 +121,7 @@ If you're using the Symfony Standard Edition, then you're probably already
using the bootstrap file. To be sure, open your front controller (usually
``app.php``) and check to make sure that the following line exists::

require_once __DIR__.'/../app/bootstrap.php.cache';
include_once __DIR__.'/../var/bootstrap.php.cache';

Note that there are two disadvantages when using a bootstrap file:

Expand Down

0 comments on commit 6b5c977

Please sign in to comment.