Clears cache, regenerates all proxy classes, and updates metadatas in all entity managers
5042
public function refreshEntities()
    {

        $metadatas = $this->clearCacheAndProxies();

        // Finally, we update the schema
        $tool = new SchemaTool($this->entityManager);
        $tool->updateSchema($metadatas, true);
    }
1168540
private function clearEntityManagers()
    {
        foreach ($this->managerRegistry->getManagers() as /* @var $manager EntityManager */ $manager) {
            if (!$manager instanceof EntityManager) {
                continue;
            }
            $manager->clear();
            if (!$manager->getConnection()->ping()) {
                $manager->getConnection()->close();
                $manager->close();
            }
        }
    }
211212
@Override
	public void clearCache() {
		entityCache.clearCache(CPDefinitionOptionValueRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
147228
function updateClasses(clearContainerCache, contexts) {

	if (clearContainerCache || !containerCache) {
		containerCache = createCacheMap();
	}

	if (!Object.keys(queries).length) {
		return;
	}

	var elementsTree = buildElementsTree(contexts);

	while(updateClassesRead(elementsTree)) {
		updateClassesWrite(elementsTree);
	}
	updateClassesWrite(elementsTree);

}
745936
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceNotificationQueueEntryImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
402198
@Override
    public final void process(final Class<?> entityClass, EntityMetadata metadata)
    {

        Cacheable cacheable = (Cacheable) entityClass.getAnnotation(Cacheable.class);

        if (null != cacheable)
        {
            metadata.setCacheable(cacheable.value());
        }
    }
889695
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceDiscountImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
1196127
public static function reset_caches() {
        self::$requestinguserid = null;
        self::$eventfactory = null;
        self::$eventmapper = null;
        self::$eventvault = null;
        self::$actionfactory = null;
        self::$eventretrievalstrategy = null;
        self::$coursecache = [];
        self::$modulecache = [];
    }
5360
protected void refreshFromSystem() {
        try {
            // Re-read and re-register all of the namespaces ...
            SessionCache systemCache = repository.createSystemSession(repository.context(), false);
            SystemContent system = new SystemContent(systemCache);
            CachedNode locks = system.locksNode();
            MutableCachedNode mutableLocks = null;
            Set<NodeKey> corruptedLocks = new HashSet<>();
            for (ChildReference ref : locks.getChildReferences(systemCache)) {
                CachedNode node = systemCache.getNode(ref);
                if (node == null) {
                    if (mutableLocks == null) {
                        mutableLocks = system.mutableLocksNode();
                    }
                    NodeKey lockKey = ref.getKey();
                    logger.warn(JcrI18n.lockNotFound, lockKey);
                    mutableLocks.removeChild(systemCache, lockKey);
                    corruptedLocks.add(lockKey);
                    continue;
                }
                ModeShapeLock lock = new ModeShapeLock(node, systemCache);
                locksByNodeKey.put(lock.getLockedNodeKey(), lock);
            }
            if (mutableLocks != null) {
                system.save();
                for (Iterator<Map.Entry<NodeKey, ModeShapeLock>> locksIterator = locksByNodeKey.entrySet().iterator(); 
                     locksIterator.hasNext();) {
                    NodeKey lockKey = locksIterator.next().getValue().getLockKey();
                    if (corruptedLocks.contains(lockKey)) {
                        locksIterator.remove();
                    }
                }
            }
        } catch (Throwable e) {
            logger.error(e, JcrI18n.errorRefreshingLocks, repository.name());
        }
    }
1035822
public void refresh(Object entity)
    {
        if (contains(entity))
        {
            MainCache mainCache = (MainCache) getPersistenceCache().getMainCache();
            Node node = mainCache.getNodeFromCache(entity, getMetadata(entity.getClass()), this);
            // Locking as it might read from persistence context.

            try
            {
                lock.readLock().lock();
                node.setPersistenceDelegator(this);
                node.refresh();
            }
            finally
            {
                lock.readLock().unlock();
            }
        }
        else
        {
            throw new IllegalArgumentException("This is not a valid or managed entity, can't be refreshed");
        }
    }
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();
    }
895147
public function clear()
    {
        $this->identityMap =
        $this->entityIdentifiers =
        $this->entityChangeSets =
        $this->entityStates =
        $this->scheduledForDirtyCheck =
        $this->entityInsertions =
        $this->entityUpdates =
        $this->entityDeletions = array();
    }
406629
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceNotificationTemplateUserSegmentRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
306714
@Override
	public void clearCache() {
		entityCache.clearCache(CPFriendlyURLEntryImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
1299832
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceAddressImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
1229398
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceAvailabilityEstimateImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
873734
@Override
	public void clearCache() {
		entityCache.clearCache(CPOptionImpl.class);

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