8000 [FrameworkBundle] Dont store cache misses on warmup · symfony/symfony@512e889 · GitHub
[go: up one dir, main page]

Skip to content

Commit 512e889

Browse files
committed
[FrameworkBundle] Dont store cache misses on warmup
1 parent e16be83 commit 512e889

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public function warmUp($cacheDir)
5858
// so here we un-serialize the values first
5959
$values = array_map(function ($val) { return null !== $val ? unserialize($val) : null; }, $arrayAdapter->getValues());
6060

61+
// Remove null values (cache misses)
62+
$values = array_filter($values);
63+
6164
$this->warmUpPhpArrayAdapter(new PhpArrayAdapter($this->phpArrayFile, new NullAdapter()), $values);
6265
}
6366

0 commit comments

Comments
 (0)
0