Purge the cache and redisplays the screen allowing to create new instances.

@Action
@Logged
329817
public function refreshNewInstance($selfedit = "false", $instanceName=null, $instanceClass=null) {
        $moufCache = new MoufCache();
        $moufCache->purgeAll();

        header("Location: newInstance2?selfedit=".$selfedit."&instanceName=".urlencode($instanceName)."&instanceClass=".urlencode($instanceClass));
    }
802887
public function flush()
    {
        $keys = $this->getCacheKeys();
        foreach ($keys as $key) {
            Cache::forget($this->makeCacheKey($key));
        }
        $this->removeKeys($keys);
    }
380964
public function clean() {
    $this->logger->info('%name started.', ['%name' => get_class($this)]);

    $dataToRemove = $this->wrapper->getDataToRemove();
    foreach ($dataToRemove as $locationId => $locationData) {
      foreach ($locationData as $classId) {
        $this->mappingRepo->removeByLocationIdAndClassId($locationId, $classId);
      }
    }

    $this->logger->info('%name finished.', ['%name' => get_class($this)]);
  }
747576
public function cleanup(): void
    {
        foreach ($this->getStore() as $key => $value)
        {
            $this->remove($key);
        }
    }
848457
public function instance_deleted() {
        if ($this->connection) {
            $connection = $this->connection;
        } else {
            $connection = new Memcached(crc32($this->name));
            $servers = $connection->getServerList();
            if (empty($servers)) {
                foreach ($this->options as $key => $value) {
                    $connection->setOption($key, $value);
                }
                $connection->addServers($this->servers);
            }
        }
        // We have to flush here to be sure we are completely cleaned up.
        // Bad for performance but this is incredibly rare.
        @$connection->flush();
        unset($connection);
        unset($this->connection);
    }
1068309
public function cleanup()
    {
        $this->listeners = [];
        $this->results = [];
        $this->jobs = [];
        $this->more = null;
    }
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;
    }
1327014
public function clear()
    {
        $this->id = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
20123
public function purgeAll() {
		if ($this->log != null) {
			if ($this->log instanceof LoggerInterface) {
				$this->log->info("Purging all data from no-cache. Nothing to purge.");
			} else {
				$this->log->trace("Purging all data from no-cache. Nothing to purge.");
			}
		}
	}
819681
protected function reset()
    {
        $this->parameters = [];
        $this->instances  = [];
        $this->services   = [];

        static::$instance = null;
        unset(static::$instance);
    }
132389
public function cleanup()
    {
        $this->listeners = null;
        $this->producer = null;
        $this->args = [];
        $this->parent = null;
    }
116301
public function clearCachedObjects()
    {
        $this->containerInstance = null;
        $this->eventDispatcher = null;
        $this->viewRenderer = null;
        $this->session = null;
        $this->httpRouter = null;
        $this->collectorList = null;
        $this->cache = [];
        $this->config = [];
        $this->connection = [];
        $this->database = [];
        $this->entityManager = [];
        TemplateStream::clearCache();
    }
241058
private function CleanUp() {

		// remove possible empty keys
		$AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
		foreach ($AVpossibleEmptyKeys as $dummy => $key) {
			if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
				unset($this->info['audio'][$key]);
			}
			if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
				unset($this->info['video'][$key]);
			}
		}

		// remove empty root keys
		if (!empty($this->info)) {
			foreach ($this->info as $key => $value) {
				if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
					unset($this->info[$key]);
				}
			}
		}

		// remove meaningless entries from unknown-format files
		if (empty($this->info['fileformat'])) {
			if (isset($this->info['avdataoffset'])) {
				unset($this->info['avdataoffset']);
			}
			if (isset($this->info['avdataend'])) {
				unset($this->info['avdataend']);
			}
		}

		// remove possible duplicated identical entries
		if (!empty($this->info['error'])) {
			$this->info['error'] = array_values(array_unique($this->info['error']));
		}
		if (!empty($this->info['warning'])) {
			$this->info['warning'] = array_values(array_unique($this->info['warning']));
		}

		// remove "global variable" type keys
		unset($this->info['php_memory_limit']);

		return true;
	}
636828
private function cleanIn()
    {
        //====================================================================//
        //  Free current output buffer
        $this->inputs = null;
        //====================================================================//
        //  Initiate a new input buffer
        $this->inputs = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);

        return true;
    }
744969
public function clean()
    {
        foreach ( $this->createdObjects as $object )
        {
            $this->destroy( $object );
        }

        $this->createdObjects = array();
    }
867497
protected function clearCache()
    {
        $oldCacheDirName = "{$this->cacheDir}_old";
        $this->fs->rename($this->cacheDir, $oldCacheDirName);
        $this->fs->remove($oldCacheDirName);
    }
262783
function reset()
    {
        $this->result = null;
        $this->filter = null;
        $this->cache  = null;
    }