The static method first removes all values in the caches. Then the cache
is initialized automatically depending on the desired RunLevel

@param _runLevel   name of run level to initialize
@throws EFapsException on error
173037
public static void init(final String _runLevel)
        throws EFapsException
    {
        RunLevel.ALL_RUNLEVELS.clear();
        RunLevel.RUNLEVEL = new RunLevel(_runLevel);
    }
25546
public function printout($clear = true, $runlevel = null) {
		if($runlevel === null) {
			$runlevel = $this->runlevel;
		}
		foreach($this->data as $data) {
			if($runlevel <= $data[0]) {
				$this->writeLine($data[1], $runlevel, $data[2]);
			}
		}
		if($clear) {
			$this->data = array();
		}
	}
1262945
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceCurrencyImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
965067
@FFDCIgnore(CacheException.class)
    private void cacheInit() {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        // Attempt lazy initialization if necessary
        try{
            if (cacheStoreService.cacheManager == null)
                cacheStoreService.activateLazily();

            // Build a unique per-application cache name by starting with the application context root and percent encoding
            // the / and : characters (JCache spec does not allow these in cache names)
            // and also the % character (which is necessary because of percent encoding)
            String a = PERCENT.matcher(_iStore.getId()).replaceAll("%25"); // must be done first to avoid replacing % that is added when replacing the others
            a = SLASH.matcher(a).replaceAll(".");
            a = COLON.matcher(a).replaceAll(".");

            // Session Meta Information Cache

            String metaCacheName = new StringBuilder(24 + a.length()).append("com.ibm.ws.session.meta.").append(a).toString();

            if (trace && tc.isDebugEnabled())
                tcInvoke(cacheStoreService.tcCacheManager, "getCache", metaCacheName, "String", "ArrayList");

            sessionMetaCache = cacheStoreService.cacheManager.getCache(metaCacheName, String.class, ArrayList.class);
            boolean create;
            if (create = sessionMetaCache == null) {
                if (trace && tc.isDebugEnabled())
                    tcReturn(cacheStoreService.tcCacheManager, "getCache", "null");

                @SuppressWarnings("rawtypes")
                MutableConfiguration<String, ArrayList> config = new MutableConfiguration<String, ArrayList>()
                .setTypes(String.class, ArrayList.class)
                .setExpiryPolicyFactory(EternalExpiryPolicy.factoryOf());
                if (cacheStoreService.supportsStoreByReference)
                    config = config.setStoreByValue(false);
                try {
                    if (trace && tc.isDebugEnabled())
                        tcInvoke(cacheStoreService.tcCacheManager, "createCache", metaCacheName, config);

                    sessionMetaCache = cacheStoreService.cacheManager.createCache(metaCacheName, config);
                } catch (CacheException x) {
                    create = false;
                    if (trace && tc.isDebugEnabled()) {
                        tcReturn(cacheStoreService.tcCacheManager, "createCache", x);
                        tcInvoke(cacheStoreService.tcCacheManager, "getCache", metaCacheName, "String", "ArrayList");
                    }
                    sessionMetaCache = cacheStoreService.cacheManager.getCache(metaCacheName, String.class, ArrayList.class);
                    if (sessionMetaCache == null)
                        throw x;
                }
            }

            tcSessionMetaCache = "MetaCache" + Integer.toHexString(System.identityHashCode(sessionMetaCache));
            if (trace && tc.isDebugEnabled())
                tcReturn(cacheStoreService.tcCacheManager, create ? "createCache" : "getCache", tcSessionMetaCache, sessionMetaCache);

            cacheStoreService.configureMonitoring(metaCacheName);

            // Session Attributes Cache

            String attrCacheName = new StringBuilder(24 + a.length()).append("com.ibm.ws.session.attr.").append(a).toString();

            if (trace && tc.isDebugEnabled())
                tcInvoke(cacheStoreService.tcCacheManager, "getCache", attrCacheName, "String", "byte[]");

            sessionAttributeCache = cacheStoreService.cacheManager.getCache(attrCacheName, String.class, byte[].class);

            if (create = sessionAttributeCache == null) {
                if (trace && tc.isDebugEnabled())
                    tcReturn(cacheStoreService.tcCacheManager, "getCache", "null");

                MutableConfiguration<String, byte[]> config = new MutableConfiguration<String, byte[]>()
                                .setTypes(String.class, byte[].class)
                                .setExpiryPolicyFactory(EternalExpiryPolicy.factoryOf());
                if (cacheStoreService.supportsStoreByReference)
                    config = config.setStoreByValue(false);
                try {
                    if (trace && tc.isDebugEnabled())
                        tcInvoke(cacheStoreService.tcCacheManager, "createCache", attrCacheName, config);

                    sessionAttributeCache = cacheStoreService.cacheManager.createCache(attrCacheName, config);
                } catch (CacheException x) {
                    create = false;
                    if (trace && tc.isDebugEnabled()) {
                        tcReturn(cacheStoreService.tcCacheManager, "createCache", x);
                        tcInvoke(cacheStoreService.tcCacheManager, "getCache", attrCacheName, "String", "byte[]");
                    }
                    sessionAttributeCache = cacheStoreService.cacheManager.getCache(attrCacheName, String.class, byte[].class);
                    if (sessionAttributeCache == null)
                        throw x;
                }
            }

            tcSessionAttrCache = "AttrCache" + Integer.toHexString(System.identityHashCode(sessionAttributeCache));
            if (trace && tc.isDebugEnabled())
                tcReturn(cacheStoreService.tcCacheManager, create ? "createCache" : "getCache", tcSessionAttrCache, sessionAttributeCache);

            cacheStoreService.configureMonitoring(attrCacheName);
        } catch(Exception ex) {
            //auto ffdc
            Tr.error(tc, "ERROR_SESSION_INIT", ex);
            throw new RuntimeException(Tr.formatMessage(tc, "INTERNAL_SERVER_ERROR"));
        }
    }
114891
public function initializeFusionRuntime()
    {
        if ($this->fusionRuntime === null) {
            $this->loadFusion();
            $this->fusionRuntime = new Runtime($this->parsedFusion, $this->controllerContext);
        }
        if (isset($this->options['debugMode'])) {
            $this->fusionRuntime->setDebugMode($this->options['debugMode']);
        }
        if (isset($this->options['enableContentCache'])) {
            $this->fusionRuntime->setEnableContentCache($this->options['enableContentCache']);
        }
    }
1314723
protected void prepareQuery()
        throws EFapsException
    {
        this.sqlTable2Index.put(getBaseType().getMainTable(), 0);
        if (getBaseType().getMainTable() == null) {
            throw new EFapsException(AbstractObjectQuery.class, "BaseType", getBaseType());
        }
        if (getBaseType().getMainTable().getSqlColType() != null) {
            final QEqual eqPart = new QEqual(new QAttribute(getBaseType().getTypeAttribute()),
                                           new QNumberValue(getBaseType().getId()));
            if (this.includeChildTypes && !getBaseType().getChildTypes().isEmpty()) {
                for (final Type type : getBaseType().getChildTypes()) {
                    eqPart.addValue(new QNumberValue(type.getId()));
                }
            }
            if (this.where == null) {
                this.where = new QWhereSection(eqPart);
            } else {
                this.where.setPart(new QAnd(this.where.getPart(), eqPart));
            }
        }
        if (getBaseType().isCompanyDependent()) {
            final QEqual eqPart = new QEqual(new QAttribute(getBaseType().getCompanyAttribute()));
            if (this.isCompanyDependent()) {
                if (Context.getThreadContext().getCompany() == null) {
                    throw new EFapsException(InstanceQuery.class, "noCompany");
                }
                if (getBaseType().getCompanyAttribute().getAttributeType().getClassRepr().equals(
                                ConsortiumLinkType.class)) {
                    for (final Long consortium : Context.getThreadContext().getCompany().getConsortiums()) {
                        eqPart.addValue(new QNumberValue(consortium));
                    }
                } else {
                    eqPart.addValue(new QNumberValue(Context.getThreadContext().getCompany().getId()));
                }
            } else {
                for (final Long compId : Context.getThreadContext().getPerson().getCompanies()) {
                    if (getBaseType().getCompanyAttribute().getAttributeType().getClassRepr().equals(
                                    ConsortiumLinkType.class)) {
                        for (final Long consortium : Company.get(compId).getConsortiums()) {
                            eqPart.addValue(new QNumberValue(consortium));
                        }
                    } else {
                        eqPart.addValue(new QNumberValue(compId));
                    }
                }
            }
            // only add if an actual filter was set. A background process might not use Companies at all.
            if (CollectionUtils.isNotEmpty(eqPart.getValues())) {
                if (this.where == null) {
                    this.where = new QWhereSection(eqPart);
                } else {
                    this.where.setPart(new QAnd(this.where.getPart(), eqPart));
                }
            }
        }
        if (this.where != null) {
            this.where.prepare(this);
        }
        if (this.orderBy != null) {
            this.orderBy.prepare(this);
        }

        if (this.limit != null) {
            this.limit.prepare(this);
        }
    }
258502
public synchronized void clear() {
		_layerCache.clear();
		_moduleCache.clear();
		_gzipCache.clear();
		for (IGenericCache cache : _namedCaches.values()) {
			cache.clear();
		}
	}
1037882
public void execute(final IRunnable _runnable)
        throws EFapsException
    {
        try {
            final List<IEQLRunner> instances = new ArrayList<>();
            for (final Class<? extends IEQLRunner> clazz : EQLRUNNERS) {
                final IEQLRunner runner = clazz.newInstance();
                instances.add(runner);
                runner.prepare(_runnable);
            }
            for (final IEQLRunner runner : instances) {
                runner.execute();
            }
        } catch (InstantiationException | IllegalAccessException e) {
            LOG.error("Problems while instantiating", e);
        }
    }
991128
@Api
	public void runWhenInitialized(Runnable runnable) {
		if (isInitialized()) {
			runnable.run();
		} else {
			whenInitializedRunnables.add(runnable);
		}
	}
766755
@Override
	public void clearCache() {
		entityCache.clearCache(CPAttachmentFileEntryImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
1203153
private void init()
        throws EFapsException
    {
        if (!this.initialized) {
            Listener.LOG.info("Scanning for Listener classes....");
            this.classes.clear();
            this.classes.addAll(new EsjpScanner().scan(EFapsListener.class));

            if (Listener.LOG.isInfoEnabled() && !this.classes.isEmpty()) {
                logClasses("Listener classes found:", this.classes);
            }
            this.initialized = true;
        }
    }
1286659
public void closeContext()
        throws EFapsException
    {
        if (isLogedIn()) {
            try {
                if (!Context.isTMNoTransaction()) {
                    if (Context.isTMActive()) {
                        Context.commit();
                    } else {
                        Context.rollback();
                    }
                }
            } catch (final SecurityException e) {
                throw new EFapsException("SecurityException", e);
            } catch (final IllegalStateException e) {
                throw new EFapsException("IllegalStateException", e);
            }
        }
    }
1109081
private void setRunLevel(int level) {

        if (m_instance != null) {
            if (m_instance.m_runLevel >= OpenCms.RUNLEVEL_1_CORE_OBJECT) {
                // otherwise the log is not available
                if (CmsLog.INIT.isInfoEnabled()) {
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(
                            Messages.INIT_RUNLEVEL_CHANGE_2,
                            new Integer(m_instance.m_runLevel),
                            new Integer(level)));
                }
            }
            m_instance.m_runLevel = level;
        }
    }
1171017
protected void checkAccess()
        throws EFapsException
    {
        for (final Instance instance : getInstances()) {
            if (!instance.getType().hasAccess(instance, AccessTypeEnums.DELETE.getAccessType(), null)) {
                LOG.error("Delete not permitted for Person: {} on Instance: {}", Context.getThreadContext().getPerson(),
                                instance);
                throw new EFapsException(getClass(), "execute.NoAccess", instance);
            }
        }
    }
856147
public void removeFromCache(Set<String> rootPaths, boolean online) {

        Map<String, Boolean> cache;
        if (online) {
            cache = m_onlineJsps;
        } else {
            cache = m_offlineJsps;
        }
        Iterator<String> itRemove = rootPaths.iterator();
        while (itRemove.hasNext()) {
            String rootPath = itRemove.next();
            cache.remove(rootPath);
        }
    }
721879
@Override
	public void clearCache() {
		entityCache.clearCache(CPDefinitionSpecificationOptionValueImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
770988
@Override
	public void clearCache(CPAttachmentFileEntry cpAttachmentFileEntry) {
		entityCache.removeResult(CPAttachmentFileEntryModelImpl.ENTITY_CACHE_ENABLED,
			CPAttachmentFileEntryImpl.class,
			cpAttachmentFileEntry.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

		clearUniqueFindersCache((CPAttachmentFileEntryModelImpl)cpAttachmentFileEntry,
			true);
	}