return true if the cache is too old
@access public
@return string
@since 3.0
@package Gcs\Framework\Core\Cache
192196
public function isDie() {
        if ($this->_time > 0) {
            $die = false;

            if (!file_exists($this->_fileName)) {
                $die = true;
            }
            else {
                $timeAgo = time() - filemtime($this->_fileName);
                if ($timeAgo > $this->_time) {
                    $die = true;
                }
            }

            return $die;
        }
        else {
            return true;
        }
    }
656772
public static function nocache(): bool
    {
        if (!headers_sent()) {
            header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
            header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
            header('Cache-Control: no-cache, must-revalidate, max-age=0');
            header('Pragma: no-cache');

            return true;
        }

        return false;
    }
334812
private function _isCached() 
    {
        $filters = false;

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

        return $filters;
    }
401849
protected function checkExpire($cache_data)
    {
        $time = time();
        $is_expire = intval($cache_data['expire']) !== 0 && (intval($cache_data['time']) + intval($cache_data['expire']) < $time);
        if ($is_expire) {
            return false;
        }

        return true;
    }
1319126
public function isEsiDown(): bool
    {

        // Check if we may have hit an error threshold
        if ($this->isEsiRateLimited()) return true;

        // Get the latest ESI status.
        $status = Cache::remember('esi_db_status', 1, function () {

            return EsiStatus::latest()->first();
        });

        // If we don't have a status yet, assume everything is ok.
        if (! $status) return false;

        // If the data is too old, return false by default.
        // Not being able to ping ESI could be indicative
        // of many other problems.
        if ($status->created_at->lte(carbon('now')->subHours(2)))
            return true;

        // If the status is OK, yay.
        if ($status->status == 'ok')
            return false;

        return true;
    }
670815
def is_obsolete(self):
        
        if self.cache_updated:
            now = timezone.now()
            delta = now - self.cache_updated
            if delta.seconds < self.cache_validity:
                return False
        return True
541611
public function get_cache_expiration() {
		$cache = get_post_meta( $this->post_id, '_inc2734_count_cache_' . $this->service_name, true );
		if ( ! empty( $cache['expiration'] ) ) {
			return date_i18n( 'm-d-Y H:i:s', $cache['expiration'] );
		}
	}
586780
private function cacheGc() {
    $probMax = 1 / self::GC_PROB;
    $do = rand(1, $probMax);
    if($do > 1) {
      /* Skipping GC this time. */
      return false;
    }
    $cahceIds = $this->store->listIds('cache');
    foreach($cahceIds as $cahceId) {
      try {
        $data = $this->store->read('cache', $cahceId);
      } catch (\phpSec\Exception $e) {
        /* Skip this. */
        continue;
      }

      if($data['ttl'] < time()) {
        $this->store->delete('cache', $cahceId);
      }
    }
    return true;
  }
1194776
private function _checkStructureVersion()
    {
        $result = $this->_query("SELECT num FROM version");
        if (!$result) return false;
        $row = @sqlite_fetch_array($result);
        if (!$row) {
            return false;
        }
        if (((int) $row['num']) != 1) {
            // old cache structure
            $this->_log('Zend_Cache_Backend_Sqlite::_checkStructureVersion() : old cache structure version detected => the cache is going to be dropped');
            return false;
        }
        return true;
    }
674035
public function getCacheLifetime()
    {
        if ($this->cacheLifetime === null) {
            $this->setCacheLifetime($this->config->get('concrete.i18n.community_translation.cache_lifetime', 3600));
        }

        return $this->cacheLifetime;
    }
332047
public function clean()
    {
        foreach ($this->cache as $key => $value) {
            list($expires, $value) = $value;
            if ($expires && ($expires < microtime(true))) {
                unset($this->cache[$key]);
            }
        }
        return true;
    }
1046622
private function isCacheUpToDate()
    {
        if (!file_exists($this->cachedFile)) {
            return false;
        }

        $cacheTime  = filemtime($this->cachedFile);
        $configTime = max(filemtime($this->configPath), filemtime($this->envFile));

        return $cacheTime == $configTime;
    }
564307
public function lastRunAt()
    {
        if ($this->cache->has($this->cacheKey)) {
            $executedAt = $this->cache->get($this->cacheKey);
            
            return $executedAt;
        } else {
            return null;
        }
    }
1111076
public function isExpired()
    {
        $payload = $this->getPayload();

        if (isset($payload['exp'])) {
            $now = new \DateTime('now');

            if (is_int($payload['exp'])) {
                return ($now->getTimestamp() - $payload['exp']) > 0;
            }

            if (is_numeric($payload['exp'])) {
                return ($now->format('U') - $payload['exp']) > 0;
            }
        }

        return false;
    }
306239
public function checkForCacheFile()
    {
        // first check if we can create a file
        if (!$this->canCreateCacheFile()) {
            return;
        }
        $cacheEntry = HtmlCacheCache::findOne(['uri' => $this->uri, 'siteId' => $this->siteId]);

        // check if cache exists
        if ($cacheEntry) {
            $file = $this->getCacheFileName($cacheEntry->uid);
            if (file_exists($file)) {
                // load cache - may return false if cache has expired
                if ($this->loadCache($file)) {
                    return \Craft::$app->end();
                }
            }
        }
        // Turn output buffering on
        ob_start();
    }
892088
def is_old(self):
        
        if not self.processing_started_ts:
            return True

        if self.processing_ended_ts:
            return self.processing_ended_ts + DB_CACHE_TIME < time.time()

        # in case that processing started, but didn't ended in
        # DB_MAX_WAIT_TIME
        expected_end_ts = self.creation_ts + DB_MAX_WAIT_TIME
        if expected_end_ts < time.time():
            logger.error("Prosessing timeouted and properites were not set!")

        return expected_end_ts < time.time()
183338
public function mtime()
	{
		if ($this->mysql === null)
		{
			return false;
		}

		$query = $this->mysql->prepare('SELECT `mtime` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
		$query->bindValue(':id', $this->id);
		if ($query->execute() && ($time = $query->fetchColumn()))
		{
			return $time;
		}

		return false;
	}