Skip to content

Commit f23f888

Browse files
committed
presence of cacheStorage is checked only in register(), not in rebuild()
1 parent 05483ef commit f23f888

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/RobotLoader/RobotLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ public function getIndexedClasses()
143143
*/
144144
public function rebuild()
145145
{
146-
$this->getCache()->save($this->getKey(), Nette\Utils\Callback::closure($this, 'rebuildCallback'));
146+
if ($this->cacheStorage) {
147+
$this->getCache()->save($this->getKey(), Nette\Utils\Callback::closure($this, 'rebuildCallback'));
148+
} else {
149+
$this->rebuildCallback();
150+
}
147151
}
148152

149153

0 commit comments

Comments
 (0)