/**
  * @see EntityRevisionLookup::getLatestRevisionId
  *
  * @since 0.5
  *
  * @param EntityId $entityId
  * @param string $mode
  *
  * @return int|false
  */
 public function getLatestRevisionId(EntityId $entityId, $mode = self::LATEST_FROM_SLAVE)
 {
     $rows = $this->entityMetaDataAccessor->loadRevisionInformation(array($entityId), $mode);
     $row = $rows[$entityId->getSerialization()];
     if ($row && $row->page_latest && !$row->page_is_redirect) {
         return (int) $row->page_latest;
     }
     return false;
 }
 private function doFetch()
 {
     if (empty($this->toFetch)) {
         return;
     }
     $data = $this->lookup->loadRevisionInformation($this->toFetch, EntityRevisionLookup::LATEST_FROM_SLAVE);
     // Store the data, including cache misses
     $this->store($data);
     // Prune $this->toFetch
     $this->toFetch = array();
 }