Purges the cache deleting all items within it.

@return boolean True on success. False otherwise.
487547
public function purge() {
        $this->flush_store_by_id($this->storeid);
        $this->store = &self::register_store_id($this->storeid);
        // Don't worry about checking if we're using max size just set it as thats as fast as the check.
        $this->storecount = 0;
        return true;
    }
30651
public function purge() {
        if (class_exists('APCUIterator', false)) {
            $iterator = new APCUIterator('#^' . preg_quote($this->cacheprefix, '#') . '#');
        } else {
            $iterator = new APCIterator('user', '#^' . preg_quote($this->cacheprefix, '#') . '#');
        }
        return apcu_delete($iterator);
    }
271132
public function clearCache()
  {
    $files = glob($this->cachePath);
    foreach($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }
368432
public function deleteAll()
	{
	    if (!$this->namespace) {
	        return $this->clear();
        }

		$namespaceCacheKey = $this->getNamespaceCacheKey();
		$namespaceVersion = $this->getNamespaceVersion() + 1;

		if ($this->doSet($namespaceCacheKey, [true, $namespaceVersion, [], 0])) {
			$this->namespaceVersion = $namespaceVersion;

			return true;
		}

		return false;
	}
1337046
public function flush() {
		$pattern = $this->getCachePath() . DIRECTORY_SEPARATOR . $this->prefix . '_*';
		
		if (self::isExecAvailable()) {
			exec('rm ' . $pattern);
			return true;
		}
		
		$list = glob($pattern);
		
		if ($list === false) {
			return false;
		}
		
		if (empty($list)) {
			return true;
		}
		
		$result = true;
		
		foreach ($list as $path) {
			if (! unlink($path)) {
				$result = false;
			}
		}
		
		return $result;
	}
24145
public function clear()
    {
        foreach ($this->items as $item) {
            $this->deleted[] = $item;
        }

        $this->items = [];
    }
226595
public function deleteAll()
    {
        try {
            array_map('unlink', glob($this->filePath('*')));
        } catch (\Exception $e) {
            return false;
        }
        $this->storage = [];
        return true;
    }
766071
public function delete() : bool
    {
        $removed = null;

        if ($this->isDirectory()) {
            $removed = rmdir($this->realPath);
        } else {
            $removed = unlink($this->realPath);
        }

        return $removed;
    }
999047
public function clear()
    {
        $result = true;
        $dir = new \DirectoryIterator($this->path);
        foreach ($dir as $file) {
            $extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
            if (!$file->isDot() && $extension === 'ser') {
                if (!@unlink($this->path.'/'.$file->getFilename())) {
                    $result = false;
                }
            }
        }

        return $result;
    }
746251
public function delete_all_items() {
        // Cleanup all items.
        $items = $this->get_items();
        foreach ($items as $item) {
            if ($this->can_delete()) {
                $this->delete_item($item);
            }
        }
    }
1305714
public function clear()
    {
        foreach ($this->filesystem()->listContents() as $file) {
            $this->filesystem()->delete($file['path']);
        }

        return true;
    }
1171602
public function delete()
    {
        if (!$this->isNew()) {
            $this->_collection->remove(['_id' => $this->_id]);
            $this->_cache->delete(static::getCollection()."_{$this->_id}");
            return true;
        }
        return false;
    }
1263362
public function delete()
    {
        $database = DatabaseLayer::getInstance();

        $delete = $database->delete($this->getTableName(), $this->getTableAlias());
        $delete->setModel($this);
        $delete->condition($this->getIDField(), $this->getId());
        $delete->execute($this->getClass());

        // Invalidate cache.
        SearchIndex::getInstance()->expire($this->getTableName(), $this->getId());

        return true;
    }
984211
public function clear()
    {
        $result = false;
        if (false !== $files = @scandir($this->cachedir)) {
            foreach ($files as $file) {
                $file = $this->cachedir.DIRECTORY_SEPARATOR.$file;
                if (false === is_dir($file)) {
                    if (false === @unlink($file)) {
                        $this->log('warning', sprintf('Enable to remove cache file `%s`.', $file));
                    } else {
                        $result = true;
                    }
                }
            }
        }

        if (true === $result) {
            $this->log('debug', sprintf('File system cache cleared in `%s`.', $this->cachedir));
        }

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

        return true;
    }
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;
    }
788143
public boolean purgeCache() {
        final SQLiteDatabase db = getDb();
        if (db != null && db.isOpen()) {
            try {
                db.delete(TABLE, null, null);
                return true;
            } catch (Exception e) {
                Log.w(IMapView.LOGTAG, "Error purging the db", e);
                catchException(e);
            }
        }
        return false;
    }