Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4127ad9

Browse filesBrowse files
Update performance.rst
The example provided under "Caching the Autoloader with APC" is not in sync with the content of the 'app.php' file in Symfony 2.8: * the comment hint was removed in #964 * the autoloader was extracted from bootstrap: symfony/symfony-standard@747a384
1 parent f17e4fe commit 4127ad9
Copy full SHA for 4127ad9

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎performance.rst

Copy file name to clipboardExpand all lines: performance.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ Caching the Autoloader with APC
7171
Another solution is to cache the location of each class after it's located
7272
the first time. Symfony comes with a class - :class:`Symfony\\Component\\ClassLoader\\ApcClassLoader` -
7373
that does exactly this. To use it, just adapt your front controller file.
74-
If you're using the Standard Distribution, this code should already be available
75-
as comments in this file::
74+
If you're using the Standard Distribution, make the following changes::
7675

7776
// app.php
7877
// ...
78+
79+
use Symfony\Component\ClassLoader\ApcClassLoader;
7980

80-
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
81+
$loader = require __DIR__.'/../app/autoload.php';
82+
include_once __DIR__.'/../app/bootstrap.php.cache';
8183

8284
// Use APC for autoloading to improve performance
8385
// Change 'sf2' by the prefix you want in order
8486
// to prevent key conflict with another application
85-
/*
8687
$loader = new ApcClassLoader('sf2', $loader);
8788
$loader->register(true);
88-
*/
8989

9090
// ...
9191

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.