Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit918e9c2

Browse files
trsteel88weaverryan
authored andcommitted
Generate an APC prefix based on __FILE__
Relates tohttps://github.com/symfony/symfony-standard/issues/654
1 parent4211bff commit918e9c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎components/class_loader/cache_class_loader.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ ApcClassLoader
3737
// instance of a class that implements a findFile() method, like the ClassLoader
3838
$loader = ...;
3939
40-
//my_prefix is the APC namespace prefix to use
41-
$cachedLoader = new ApcClassLoader('my_prefix', $loader);
40+
//sha1(__FILE__) generates an APC namespace prefix
41+
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
4242
4343
// register the cached class loader
4444
$cachedLoader->register();
@@ -60,8 +60,8 @@ it is straightforward::
6060
// instance of a class that implements a findFile() method, like the ClassLoader
6161
$loader = ...;
6262
63-
//my_prefix is the XCache namespace
64-
$cachedLoader = new XcacheClassLoader('my_prefix', $loader);
63+
//sha1(__FILE__) generates an XCache namespace prefix
64+
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
6565
6666
// register the cached class loader
6767
$cachedLoader->register();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp