You are here

public function PHPExcel_CachedObjectStorage_Memcache::isDataSet in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memcache.php \PHPExcel_CachedObjectStorage_Memcache::isDataSet()

* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * *

Parameters

string $pCoord Coordinate address of the cell to check: * @return boolean * @return boolean

Overrides PHPExcel_CachedObjectStorage_CacheBase::isDataSet

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memcache.php, line 113

Class

PHPExcel_CachedObjectStorage_Memcache
PHPExcel_CachedObjectStorage_Memcache

Code

public function isDataSet($pCoord) {

  //	Check if the requested entry is the current object, or exists in the cache
  if (parent::isDataSet($pCoord)) {
    if ($this->_currentObjectID == $pCoord) {
      return true;
    }

    //	Check if the requested entry still exists in Memcache
    $success = $this->_memcache
      ->get($this->_cachePrefix . $pCoord . '.cache');
    if ($success === false) {

      //	Entry no longer exists in Memcache, so clear it from the cache array
      parent::deleteCacheData($pCoord);
      throw new PHPExcel_Exception('Cell entry ' . $pCoord . ' no longer exists in MemCache');
    }
    return true;
  }
  return false;
}