Skip to content

Commit

Permalink
ModelLoader: Fixed caching of non-existent objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaskill committed Jun 16, 2017
1 parent fb14ebd commit fd7c1c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Charcoal/Model/Service/ModelLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function load($ident, $useCache = true, $reloadObj = false)
}

$obj = $this->loadFromSource($ident);
$objData = $obj->data();
$objData = ($obj->id() ? $obj->data() : []);
$this->cachePool->save($cacheItem->set($objData));

return $obj;
Expand Down

0 comments on commit fd7c1c7

Please sign in to comment.