Gets entities from the static cache.
$ids: If not empty, return entities that match these IDs.
$conditions: If set, return entities that match all of these conditions.
Array of entities from the entity cache.
Overrides DrupalDefaultEntityController::cacheGet
protected function cacheGet($ids, $conditions = array()) {
$terms = parent::cacheGet($ids, $conditions);
// Name matching is case insensitive, note that with some collations
// LOWER() and drupal_strtolower() may return different results.
foreach ($terms as $term) {
$term_values = (array) $term;
if (isset($conditions['name']) && drupal_strtolower($conditions['name'] != drupal_strtolower($term_values['name']))) {
unset($terms[$term->tid]);
}
}
return $terms;
}