Gets entities from the static cache.
$ids: If not empty, return entities that match these IDs.
Array of entities from the entity cache.
protected function cacheGet($ids) {
$entities = array();
// Load any available entities from the internal cache.
if (!empty($this->entityCache)) {
$entities += array_intersect_key($this->entityCache, array_flip($ids));
}
return $entities;
}