Expires the wildcard cache. This causes the wildcard cache to be
regenerated on the next page load.
@return void
344975
public static function expireCache()
    {
        $handler = eZExpiryHandler::instance();
        $handler->setTimestamp( self::CACHE_SIGNATURE, time() );
        $handler->store();

        self::$wildcardsIndex = null;
    }
358969
protected function isCacheExpired()
    {
        $ts = filemtime($this->filePath);
        if (!$this->cacheOnly && time() - $ts >= $this->refreshInterval) {
            $this->log->debug("Cache content {$this->filePath} expired ({$this->refreshInterval})");

            return true;
        }

        return false;
    }
370232
public function clear()
    {
        echo $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

        foreach ($files as $file)
        {
            // if cache file expire, delete cache file
            if ( time() > filemtime($file) )
            {
                @unlink($file);
            }
        }
    }
692797
def clear_all_expired()
      t = Time.now
      return if t < @next_expiration && ! @cache.any? {|name, _| @cache_expiration_service.expired?(name.to_sym) }
      to_expire = @cache.select { |name, entry| entry.expires < t || @cache_expiration_service.expired?(name.to_sym) }
      to_expire.each do |name, entry|
        Puppet.debug {"Evicting cache entry for environment '#{name}'"}
        @cache_expiration_service.evicted(name)
        clear(name)
        @expirations.delete(entry.expires)
        Puppet.settings.clear_environment_settings(name)
      end
      @next_expiration = @expirations.first || END_OF_TIME
    end
1358811
public function logout(): void
    {
        Internal\Cookies::setList(Internal\Cookies::TYPE_SERVER, [
            ['name' => '_s', 'value' => 'deleted', 'expire' => 0],
            ['name' => '_a', 'value' => 'deleted', 'expire' => 0]
        ]);
        self::$cache = [];
    }
1272536
private function autoPruneExpiredEntries()
    {
        if (0 === $this->options['prune_threshold']) {
            return;
        }

        $item = $this->cache->getItem(self::COUNTER_KEY);
        $counter = (int) $item->get();

        if ($counter > $this->options['prune_threshold']) {
            $this->prune();
            $counter = 0;
        } else {
            ++$counter;
        }

        $item->set($counter);

        $this->cache->saveDeferred($item);
    }
277614
public function renewExpiration()
    {
        if ($oReserved = $this->getReservations()) {
            $iTime = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime();
            $oReserved->oxuserbaskets__oxupdate = new \OxidEsales\Eshop\Core\Field($iTime);
            $oReserved->save();

            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("iBasketReservationTimeout");
        }
    }
225515
public static function purgeCache()
	{
		$cacheDirPaths = static::getCacheDirPaths();
		if (is_dir($cacheDirPaths['fullPath'])) {
			foreach (scandir($cacheDirPaths['fullPath']) as $file) {
				if (substr($file, -4) === '.php') {
					$file = new \File($cacheDirPaths['path'] . '/' . $file);
					$file->delete();
				}
			}
		}
	}
1227871
public function setExpires(string $expires)
    {
        if (empty($expires)) {
            Throw new HeaderException('Empty expires is not allowed.');
        }

        $this->expires = $expires;
    }
531492
function expunge()
    {
        if ($this->type == 'db' && $this->db && $this->ttl) {
            $this->db->query(
                "DELETE FROM {$this->table}"
                . " WHERE `cache_key` LIKE ?"
                . " AND `expires` < " . $this->db->now(),
                $this->prefix . '.%');
        }
    }
622504
public function invalidateBrowserCache() {
        $this->response->headers->set('Cache-Control','nocache, no-store, max-age=0, must-revalidate');
        $this->response->headers->set('Pragma','no-cache');
        $this->response->headers->set('Expires','Fri, 01 Jan 1970 00:00:00 GMT');
    }
827922
public function save()
    {
        $contents = $this->getForStorage();

        if (!is_null($this->expire)) {
            $this->cache->set($this->key, $contents, $this->expire);
        } else {
            $this->cache->set($this->key, $contents);
        }
    }
1125469
public function clearExpired()
    {
        if (! $this->enabled) {
            return;
        }
        $error = false;

        set_error_handler(function () use (&$error) {
            $error = true;
        }, E_WARNING);
        foreach (glob($this->getPath() . '/*.dat') as $file) {
            if (filemtime($file) < time()) {
                unlink($file);
            }
        }
        restore_error_handler();

        return ! $error;
    }
1025916
def expire(url)
      if url == :all
        if store.respond_to?(:keys)
          urls.each{ |u| expire(u) }
        else
          raise(NoMethodError, "The Geocoder cache store must implement `#keys` for `expire(:all)` to work")
        end
      else
        expire_single_url(url)
      end
    end
294730
public static function expires($cacheloc, $cachekey)
    {
        $cacheloc = "cache_" . $cacheloc;
        if ( isset($_SESSION[$cacheloc]) ) {
            $cache_row = $_SESSION[$cacheloc];
            if ( time() >= $cache_row[2] ) { 
                unset($_SESSION[$cacheloc]);
                return false;
            }
            if ( $cache_row[0] != $cachekey ) return false;
            if ( $cache_row[0] === false ) return false;
            return $cache_row[2] - time();
        }
        return false;
    }
509029
public function expire()
    {
        list($key, $groupKey) = $this->getKeys(func_get_args());
        $this->engine->setGroupKey($groupKey);

        if (!$this->engine->isValid($key)) {
            return false;
        }

        return $this->engine->expire($key);
    }
1133227
public function noCache()
    {
        $header = new Expires('Mon, 26 Jul 1997 05:00:00 GMT');
        $this->addHeader($header);

        $header = new CacheControl('no-cache');
        $this->addHeader($header);

        $header = new Pragma('no-cache');
        $this->addHeader($header);
    }