You are here

public function EntityAPIControllerExportable::resetCache in Entity API 7

Overrides DrupalDefaultEntityController::resetCache().

Overrides EntityAPIController::resetCache

File

includes/entity.controller.inc, line 874
Provides a controller building upon the core controller but providing more features like full CRUD functionality.

Class

EntityAPIControllerExportable
A controller implementing exportables stored in the database.

Code

public function resetCache(array $ids = NULL) {
  $this->cacheComplete = FALSE;
  if (isset($ids)) {
    foreach (array_intersect_key($this->entityCache, array_flip($ids)) as $id => $entity) {
      unset($this->entityCacheByName[$this->entityCache[$id]->{$this->nameKey}]);
      unset($this->entityCache[$id]);
    }
  }
  else {
    $this->entityCache = array();
    $this->entityCacheByName = array();
  }
}