Returns true if the current object should never be cached
@access     public
@param      bool (optional) if provided will change the value
@return     bool
544165
public function NoCache($value = null)
	{
		if ($value != null) $this->_noCache = $value;
		return $this->_noCache;
	}
753856
public function clear()
    {
        $max = xcache_count(XC_TYPE_VAR);
        for ($index = 0; $index < $max; $index++) {
            if (!xcache_clear_cache(XC_TYPE_VAR, $index)) {
                return false;
            }
        }

        return true;
    }
1207285
protected function hasChanged($classFile)
    {
        $className = $this->className($classFile);
        $cacheFile = $this->cacheFile($className);
        $cacheDate = file_exists($cacheFile) ? filemtime($cacheFile) : 0;
        $fileDate  = filemtime($classFile);

        return ($fileDate != $cacheDate);
    }
987415
public function isCached() {
    $cache = ObjectFactory::getInstance('staticCache');
    return $this->id == self::NO_CACHE ? false :
            $cache->exists(self::getCacheSection($this->type), self::getCacheId($this->id));
  }
1158171
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }

            if (!is_null($value) && $value instanceof ChangeDetector && $value->hasChange()) {
                return true;
            }
        }
        if ($this->hasFromToFields()) {
            // check for change in presence of foreign-constraint
            $fromConstraint = null !== $this->fromField->getForeignConstraint();
            $toConstraint = null !== $this->toField->getForeignConstraint();
            $constraintChange = $fromConstraint != $toConstraint;
            if ($constraintChange) {
                return true;
            }
        }

        return false;
    }
1339389
private function isCached()
    {
        $filters = false;

        if ($this->cacheSettings) {
            if ($this->cache) {
                $filters = $this->cache->getCache();
            }
        }

        return $filters;
    }
998632
public function invalidateCache(): bool
    {
        if ($this->cache !== null) {
            $this->cache->delete($this->cacheKey);
            $this->items = null;
        }

        return true;
    }
588256
function is_cached($tpl_file, $cache_id = null, $compile_id = null)
	{
		if (!$this->caching)
		return false;

		if (!isset($compile_id))
		$compile_id = $this->compile_id;

		$_params = array(
            'tpl_file' => $tpl_file,
            'cache_id' => $cache_id,
            'compile_id' => $compile_id
		);
		require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
		return smarty_core_read_cache_file($_params, $this);
	}
605971
public function offsetExists($object) : bool
    {
        $hash = spl_object_hash($object);

        return isset($this->objects[$hash]);
    }
330261
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }
        }

        return false;
    }
492457
private boolean doTryUpdateNoLock(S storable) {
        S existing = mMap.get(new Key<S>(storable, mFullComparator));
        if (existing == null) {
            return false;
        } else {
            // Copy altered values to existing object.
            existing.markAllPropertiesDirty();
            storable.copyDirtyProperties(existing);
            existing.markAllPropertiesClean();

            // Copy all values to user object, to simulate a reload.
            storable.markAllPropertiesDirty();
            existing.copyAllProperties(storable);
            storable.markAllPropertiesClean();

            return true;
        }
    }
307866
protected boolean isCacheValid(final Long lastModified) {
        return (lastModified != null && lastModified <= this.lastModifiedTime) ||
                (lastModified == null && (this.lastModifiedTime + this.noLastModifiedReloadPeriod) <= System.currentTimeMillis());
    }
768963
public function cacheExists()
    {
        $cacheFile = $this->getCacheFile();
        if (file_exists($cacheFile) && filemtime($cacheFile) > (time()-$this->cachePeriod)) {
            return(true);
        } else {
            return(false);
        }
    }
604408
public function getCacheIsReady(): bool
    {
        foreach ($this->caches as $cache) {
            if (!$cache->getCacheIsReady()) {
                return false;
            }
        }

        return true;
    }
1317090
private boolean isCacheValid()
  {
    long now = CurrentTime.currentTime();

    if ((now - _lastTime < 100) && ! CurrentTime.isTest())
      return true;

    long oldLastModified = _lastModified;
    long oldLength = _length;
    
    long newLastModified = getBacking().getLastModified();
    long newLength = getBacking().length();
    
    _lastTime = now;

    if (newLastModified == oldLastModified && newLength == oldLength) {
      _lastTime = now;
      return true;
    }
    else {
      _changeSequence.incrementAndGet();
      
      // If the file has changed, close the old file
      clearCache();
      
      _zipEntryCache.clear();
      
      _lastModified = newLastModified;
      _length = newLength;
      
      _lastTime = now;

      return false;
    }
  }
844802
public function isCached(CacheItemInterface $item = null)
    {
        if (!$item) {
            $key = $this->getCurrentKey();
            $item = $this->getItemStorage()->get($key);
        }

        return $item ? true : false;
    }
1087405
public function persist()
    {
        if (!$this->wasModified()) {
            return false;
        }

        foreach ($this->getModifiedData() as $id=>$data) {
            $this->writeToDB($id, $data);
        }

        if ($unsettedKeys = $this->getUnsettedKeys()) {
            $this->deleteFromDB($unsettedKeys);
        }

        $this->_originalAttributes = $this->_attributes;

        return true;
    }