Permalink
Browse files

bug #3830 Generate an APC prefix based on __FILE__ (trsteel88)

This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #3830).

Discussion
----------

Generate an APC prefix based on __FILE__

Relates to symfony/symfony-standard#654

Commits
-------

55a7676 Generate an APC prefix based on __FILE__
  • Loading branch information...
weaverryan committed May 15, 2014
2 parents 4211bff + 918e9c2 commit 4ed9a08f073aa515636dd8bb2a0279f7e39d1ab8
Showing with 4 additions and 4 deletions.
  1. +4 −4 components/class_loader/cache_class_loader.rst
@@ -37,8 +37,8 @@ ApcClassLoader
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// my_prefix is the APC namespace prefix to use
$cachedLoader = new ApcClassLoader('my_prefix', $loader);
// sha1(__FILE__) generates an APC namespace prefix
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();
@@ -60,8 +60,8 @@ it is straightforward::
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// my_prefix is the XCache namespace
$cachedLoader = new XcacheClassLoader('my_prefix', $loader);
// sha1(__FILE__) generates an XCache namespace prefix
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();

0 comments on commit 4ed9a08

Please sign in to comment.