8000 [ClassLoader] Fix storing not-found classes in APC cache · symfony/symfony@bc3b4f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc3b4f5

Browse files
[ClassLoader] Fix storing not-found classes in APC cache
1 parent 37dd041 commit bc3b4f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/ClassLoader/ApcClassLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ public function loadClass($class)
118118
*
119119
* @param string $class A class name to resolve to file
120120
*
121-
* @return string|null
121+
* @return string|false
122122
*/
123123
public function findFile($class)
124124
{
125-
if (false === $file = apcu_fetch($this->prefix.$class)) {
125+
$file = apcu_fetch($this->prefix.$class, $success);
126+
127+
if (!$success) {
126128
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class));
127129
}
128130

0 commit comments

Comments
 (0)
0