The routing cache needs to be cleared after a change.
This is faster then clearing the cache with the responsible command.
979403
public function clear()
    {
        $finder = new Finder();

        /** @var \Symfony\Component\Finder\SplFileInfo $file */
        foreach ($finder->files()->in($this->cacheDir)->depth(0)->name(self::CACHE_PATH_REGEX) as $file) {
            @unlink($file->getRealPath());
        }
    }
224803
def remove_cached_item(self, path):
        
        item_path = '%s/%s' % (
                self.cache_folder,
                path.strip('/')
            )

        self.blob_service.delete_blob(self.container_name, item_path)

        while self.blob_service.exists(self.container_name, item_path):
            time.sleep(0.5)

        return True
1129170
def _cleanup(self):  # pragma: no cover
        
        need_to_delete = []  # can't delete from a dict while iterating
        with self.attr_lock:
            now_time = time()
            for path in self.cache:
                if now_time - self.attr[path][TIMESTAMP_KEY] >= MAX_CACHE_TIME:
                    need_to_delete.append(path)
            for path in need_to_delete:
                del self.attr[path]
                del self.cache[path]
534400
public void clear()
    {
        if (getCache4Id() != null) {
            getCache4Id().clear();
        }
        if (getCache4Name() != null) {
            getCache4Name().clear();
        }
        if (getCache4UUID() != null) {
            getCache4UUID().clear();
        }
    }
704769
public function clearCache()
    {
        \App\Registry::$cache->remove('mmi-cms-navigation-');
        \App\Registry::$cache->remove('mmi-cms-navigation-' . \Mmi\App\FrontController::getInstance()->getRequest()->lang);
        \App\Registry::$cache->remove('mmi-cms-acl');
        return true;
    }
1369522
private static void deleteCacheInfoUpdate(CacheStatus cacheStatus) {
    if (!cacheStatus.isInited()) {
      // if it is not created yet, do nothing.
      return;
    }
    synchronized (baseDirSize) {
      Long dirSize = baseDirSize.get(cacheStatus.getBaseDir());
      if ( dirSize != null ) {
        dirSize -= cacheStatus.size;
        baseDirSize.put(cacheStatus.getBaseDir(), dirSize);
      }
    }
    synchronized (baseDirNumberSubDir) {
      Integer dirSubDir = baseDirNumberSubDir.get(cacheStatus.getBaseDir());
      if ( dirSubDir != null ) {
        dirSubDir--;
        baseDirNumberSubDir.put(cacheStatus.getBaseDir(), dirSubDir);
      }
    }
  }
253945
public void refresh() {
        if (profileFile.lastModified() > profileFileLastModified) {
            profileFileLastModified = profileFile.lastModified();
            allProfiles = loadProfiles(profileFile);
        }
        credentialProviderCache.clear();
    }
1157054
def remove_cached_item(self, path):
        
        item_path = '%s/%s/%s' % (
                current_app.static_folder,
                self.cache_folder,
                path.strip('/')
            )

        if os.path.isfile(item_path):
            os.remove(item_path)

        return True
103292
protected void drainCache() {
    // Route the tuples to correct places
    Map<Integer, List<HeronTuples.HeronTupleSet>> cache = tupleCache.getCache();

    if (!isSendTuplesToInstance(new LinkedList<Integer>(cache.keySet()))) {
      // Check whether we could send tuples
      return;
    }

    for (Map.Entry<Integer, List<HeronTuples.HeronTupleSet>> entry : cache.entrySet()) {
      int taskId = entry.getKey();
      for (HeronTuples.HeronTupleSet message : entry.getValue()) {
        sendInBound(taskId, message);
      }
    }

    // Reset the tupleCache
    tupleCache.clear();
  }
88824
def clear_request(name=None):
    '''
    
    '''
    notify_path = os.path.join(__opts__['cachedir'], 'req_state.p')
    serial = salt.payload.Serial(__opts__)
    if not os.path.isfile(notify_path):
        return True
    if not name:
        try:
            os.remove(notify_path)
        except (IOError, OSError):
            pass
    else:
        req = check_request()
        if name in req:
            req.pop(name)
        else:
            return False
        with salt.utils.files.set_umask(0o077):
            try:
                if salt.utils.platform.is_windows():
                    # Make sure cache file isn't read-only
                    __salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
                with salt.utils.files.fopen(notify_path, 'w+b') as fp_:
                    serial.dump(req, fp_)
            except (IOError, OSError):
                log.error(
                    'Unable to write state request file %s. Check permission.',
                    notify_path
                )
    return True
1023931
public function flush()
    {
        parent::flush();

        $this->middleware = [];
        $this->currentRoute = [];
        $this->loadedProviders = [];
        $this->routeMiddleware = [];
        $this->reboundCallbacks = [];
        $this->resolvingCallbacks = [];
        $this->availableBindings = [];
        $this->ranServiceBinders = [];
        $this->loadedConfigurations = [];
        $this->afterResolvingCallbacks = [];

        $this->router = null;
        $this->dispatcher = null;
        static::$instance = null;
    }
1108348
public function clearcache ()
	{
		
		if ($this->view instanceof \Sonic\View\Smarty)
		{
			$this->view->clearCompiledTemplate ();
			$this->view->clearAllCache ();
		}
		
		new \Sonic\Message ('success', 'Cache Cleared');
		$this->template = 'tools/index.tpl';
		
	}
1213190
function (req, res, next) {
                    req.mounted = true
                    req.url     = req.url.replace(remove, '')

                    // clear cached req.path
                    delete req._path
                    delete req._pathLength

                    next()
                }
1093331
def _clear_cache(url, ts=None):
    '''
    
    '''
    if ts is None:
        # Clears an entire ForeignResource cache
        res = ForeignResource(url)
        if not os.path.exists(res.cache_path_base):
            cli.printerr('%s is not cached (looked at %s)'
                         % (url, res.cache_path_base))
            return
        cli.print('%s: clearing ALL at %s'
                  % (url, res.cache_path_base))
        res.cache_remove_all()
    else:
        # Clears an entire ForeignResource cache
        res = TypedResource(url, ts)
        if not res.cache_exists():
            cli.printerr('%s is not cached for type %s (looked at %s)'
                         % (url, str(ts), res.cache_path))
            return
        cli.print('%s: clearing "%s" at %s'
                  % (url, str(ts), res.cache_path))
        if os.path.isdir(res.cache_path):
            res.cache_remove_as_dir()
        else:
            res.cache_remove()
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 = [];
    }
176607
def clear_query_caches_for_current_thread
      ActiveRecord::Base.connection_handlers.each_value do |handler|
        handler.connection_pool_list.each do |pool|
          pool.connection.clear_query_cache if pool.active_connection?
        end
      end
    end
67408
public void clear(String cacheKey) {
        ValueCacheKey key = getRequestCacheKey(cacheKey);
        if (key != null) {
            ConcurrentHashMap<ValueCacheKey, HystrixCachedObservable<?>> cacheInstance = requestVariableForCache.get(concurrencyStrategy);
            if (cacheInstance == null) {
                throw new IllegalStateException("Request caching is not available. Maybe you need to initialize the HystrixRequestContext?");
            }

            /* remove this cache key */
            cacheInstance.remove(key);
        }
    }