Clears all OpenCms internal caches.<p>

@throws Exception if something goes wrong
976107
public void clearCaches() throws Exception {

        OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, new HashMap<String, Object>()));
    }
709142
public synchronized void reload(boolean isStartup) {

        if ((OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT)
            && OpenCms.getResourceManager().hasResourceType(TYPE_XML_BUNDLE)) {
            List<CmsResource> xmlBundles = Lists.newArrayList();
            List<CmsResource> propertyBundles = Lists.newArrayList();
            try {
                I_CmsResourceType xmlType = OpenCms.getResourceManager().getResourceType(TYPE_XML_BUNDLE);
                xmlBundles = m_cms.readResources("/", CmsResourceFilter.ALL.addRequireType(xmlType), true);
            } catch (Exception e) {
                logError(e, isStartup);
            }
            try {
                I_CmsResourceType propType = OpenCms.getResourceManager().getResourceType(TYPE_PROPERTIES_BUNDLE);
                propertyBundles = m_cms.readResources("/", CmsResourceFilter.ALL.addRequireType(propType), true);
            } catch (Exception e) {
                logError(e, isStartup);
            }
            try {

                synchronized (CmsResourceBundleLoader.class) {
                    CmsResourceBundleLoader.flushBundleCache();
                    for (String baseName : m_bundleBaseNames) {
                        CmsResourceBundleLoader.flushPermanentCache(baseName);
                    }
                    m_bundleBaseNames.clear();
                    for (CmsResource xmlBundle : xmlBundles) {
                        addXmlBundle(xmlBundle);
                    }
                    for (CmsResource propertyBundle : propertyBundles) {
                        addPropertyBundle(propertyBundle);
                    }
                    if (OpenCms.getWorkplaceManager() != null) {
                        OpenCms.getWorkplaceManager().flushMessageCache();
                    }
                }
            } catch (Exception e) {
                logError(e, isStartup);
            }
        }
    }
1064137
public synchronized void shutDown() throws Exception {

        Iterator<I_CmsResourceLoader> it = m_loaderList.iterator();
        while (it.hasNext()) {
            // destroy all resource loaders
            I_CmsResourceLoader loader = it.next();
            loader.destroy();
        }

        m_loaderList = null;
        m_loaders = null;
        m_collectorNameMappings = null;
        m_mimeTypes = null;
        m_configuredMimeTypes = null;
        m_configuredRelationTypes = null;
        m_configuredHtmlConverters = null;
        m_htmlConverters = null;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SHUTDOWN_1, this.getClass().getName()));
        }
    }
1247655
public void clear() {
    if (cache == null) {
      return;
    }
    synchronized (cache) {
      inFlushAll = true;
      cache.invalidateAll();
      out.clear();
      inFlushAll = false;
    }
  }
162266
@SuppressWarnings("unchecked")
    private void refreshOwnEntries() {

        m_resourcePermissions.removeAllComponents();
        String sitePath = m_cms.getSitePath(m_resource);

        // create new ArrayLists in which inherited and non inherited entries are stored
        ArrayList<CmsAccessControlEntry> ownEntries = new ArrayList<CmsAccessControlEntry>();
        try {
            Iterator<CmsAccessControlEntry> itAces = m_cms.getAccessControlEntries(sitePath, false).iterator();
            HashSet<CmsPermissionBean> newBeans = (HashSet<CmsPermissionBean>)((HashSet<CmsPermissionBean>)(m_permissionToChange)).clone();
            while (itAces.hasNext()) {
                CmsAccessControlEntry curEntry = itAces.next();
                if (!curEntry.isInherited()) {
                    // add the entry to the own rights list
                    CmsPermissionBean bean = CmsPermissionBean.getBeanForPrincipal(
                        m_permissionToChange,
                        CmsPermissionBean.getPrincipalNameFromACE(m_cms, curEntry));
                    if (bean == null) {
                        ownEntries.add(curEntry);
                    } else {
                        if (!bean.isDeleted()) {
                            ownEntries.add(bean.toAccessControlEntry(m_cms, m_resource.getStructureId()));
                        }
                        //No new entry -> remove from new list
                        newBeans.remove(bean);
                    }
                }
            }
            for (CmsPermissionBean newBean : newBeans) {
                if (!newBean.isDeleted()) {
                    ownEntries.add(newBean.toAccessControlEntry(m_cms, m_resource.getStructureId()));
                }
            }
        } catch (CmsException e) {
            // can usually be ignored
        }

        addEntryTableToLayout(ownEntries, m_resourcePermissions, true, false);
    }
112828
private <CONTENT extends CmsXmlContent> void removeCachedContent(CmsResource resource, Map<String, CONTENT> cache) {

        Iterator<Map.Entry<String, CONTENT>> iterator = cache.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry<String, CONTENT> entry = iterator.next();
            CONTENT content = entry.getValue();
            CmsResource contentFile = content.getFile();
            if (contentFile.getStructureId().equals(resource.getStructureId())
                || contentFile.getResourceId().equals(resource.getResourceId())) {
                iterator.remove();
            }
        }

    }
1271462
public static void clearCaches()
    {
        synchronized (AbstractCache.CACHES) {
            for (final AbstractCache<?> cache : AbstractCache.CACHES) {
                cache.getCache4Id().clear();
                cache.getCache4Name().clear();
                cache.getCache4UUID().clear();
            }
        }
    }
320118
@ManagedOperation
    public void clear() {
        Set<K> keys=new HashSet<>(l2_cache.getInternalMap().keySet());
        mcastClear(keys, false);
    }
248319
public function clearCache()
    {
        $dbInstace = $this->getDbInstance();
        $sql = '
            DELETE FROM `cache`;
            VACUUM;
        ';
        $stmt = $dbInstace->prepare($sql);
        if ($stmt->execute()) {
            return;
        } else {
            $error = $stmt->errorInfo();
            $errorMsg = $error[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
    }
540110
public void actionDeleteProject() throws Exception {

        String pId = getJsp().getRequest().getParameter(CmsEditProjectDialog.PARAM_PROJECTID);
        getCms().deleteProject(new CmsUUID(pId));
        refreshList();
        actionCloseDialog();
    }
990419
protected void clearLocks(CmsProject project, List<CmsResource> resources) throws CmsException {

        CmsObject rootCms = OpenCms.initCmsObject(m_adminCms);
        rootCms.getRequestContext().setCurrentProject(project);
        rootCms.getRequestContext().setSiteRoot("");
        for (CmsResource resource : resources) {
            CmsLock lock = rootCms.getLock(resource);
            if (lock.isUnlocked()) {
                continue;
            }
            String currentPath = resource.getRootPath();
            while (lock.isInherited()) {
                currentPath = CmsResource.getParentFolder(currentPath);
                lock = rootCms.getLock(currentPath);
            }
            rootCms.changeLock(currentPath);
            rootCms.unlockResource(currentPath);
        }
    }
502056
public void purgeJspRepository() throws Exception {

        OpenCms.fireCmsEvent(
            new CmsEvent(I_CmsEventListener.EVENT_FLEX_PURGE_JSP_REPOSITORY, new HashMap<String, Object>()));
    }
676694
public void cleanup() {
        managers.clear();
        for (BeanManagerImpl beanManager : beanDeploymentArchives.values()) {
            beanManager.cleanup();
        }
        beanDeploymentArchives.clear();
        deploymentServices.cleanup();
        deploymentManager.cleanup();
        instance.clear(contextId);
    }
387969
@Override
    public final void clear() {
        int mc = this.modCount;
        Segment<K, V> segment;
        for (long segmentIndex = 0; segmentIndex >= 0;
             segmentIndex = nextSegmentIndex(segmentIndex, segment)) {
            if (!(segment = segment(segmentIndex)).isEmpty()) {
                segment.clear(this);
                mc++;
                modCount++;
            }
        }
        if (mc != modCount)
            throw new ConcurrentModificationException();
    }
1319478
@Override
    public synchronized void clear() {
        File[] files = mRootDirectory.listFiles();
        if (files != null) {
            for (File file : files) {
                file.delete();
            }
        }
        mEntries.clear();
        mTotalSize = 0;
        //todo add queue markers
        //JusLog.d("Cache cleared.");
    }
826822
public function clear(): void
    {
        // On purpose does not check if enabled, in case of prior phase being enabled we clear cache when someone asks.
        $this->cache = $this->cacheIndex = $this->cacheExpiryTime = $this->cacheAccessCount = [];
    }
1143599
void clear() {

        m_cleared = true;
        m_changed = false;
        m_file.tryUnlock();
        OpenCms.getWorkplaceAppManager().storeAppSettings(
            A_CmsUI.getCmsObject(),
            EditorSettings.class,
            getCurrentSettings());
    }