Resets template, language and menu xml cache
484373
public function resetCache()
    {
        $aTemplates = $this->getModule()->getTemplates();
        $oUtils = Registry::getUtils();
        $oUtils->resetTemplateCache($aTemplates);
        $oUtils->resetLanguageCache();
        $oUtils->resetMenuCache();

        ModuleVariablesLocator::resetModuleVariables();

        $this->_clearApcCache();
    }
1069416
private function generateCacheFile()
    {
        $previousErrorSetting = libxml_use_internal_errors(true);
        libxml_clear_errors();
        if (@$this->domDocument->schemaValidate($this->xmlSchemaFile)) {
            $this->domDocument->preserveWhiteSpace = false;
            // Reload the XML to strip whitespace from XIncluded XML.
            $this->domDocument->loadXML($this->domDocument->saveXML());

            $xslDocument = new DOMDocument('1.0', 'UTF-8');
            $xslDocument->load(__DIR__.'/Resources/xsl/flexmodel-cache.xsl');

            $processor = new XSLTProcessor();
            $processor->setParameter('', 'checksum', md5($this->domDocument->saveXML()));
            $processor->importStyleSheet($xslDocument);
            $processor->registerPHPFunctions();

            $configuration = $processor->transformToXML($this->domDocument);
            file_put_contents($this->getCacheFile(), $configuration);

            $this->loadConfiguration(false);
        } else {
            $errors = libxml_get_errors();
            foreach ($errors as $error) {
                trigger_error(sprintf('Line %s: %s in "%s"', $error->line, trim($error->message), $error->file), E_USER_WARNING);
            }
            libxml_clear_errors();
        }
        libxml_use_internal_errors($previousErrorSetting);
    }
581296
public function removeCachedMenu()
    {
        $menuTypeIds = $this->menu_items()->pluck('menu_type_id')->unique()->all();

        foreach ( $menuTypeIds as $menuTypeId ) {
            MenuHelper::clearCache($menuTypeId, app()->getLocale());
        }
    }
554708
def reset
      self.user_agent         = DEFAULT_USER_AGENT
      self.server_url         = DEFAULT_SERVER_URL
      self.chef_version       = DEFAULT_CHEF_VERSION
      self.client_name        = DEFAULT_CLIENT_NAME
      self.client_key         = DEFAULT_CLIENT_KEY
      self.connection_options = DEFAULT_CONNECTION_OPTIONS
      self.middleware         = DEFAULT_MIDDLEWARE
      self
    end
890285
function () {
            var tplDiv = this._subTplDiv; // may be null at this time
            if (tplDiv) {
                tplDiv.className = "xTplContent"; // remove the loading indicator
                ariaUtilsDom.replaceHTML(tplDiv, "#ERROR WHILE LOADING TEMPLATE#");
            }
            this._deleteTplcfg();
            this.$callback(this.tplLoadCallback, {
                success : false
            });
        }
707245
private function clearAllCaches()
    {
        $this->clearCache(self::CACHE_KEY_CSS);
        $this->clearCache(self::CACHE_KEY_SELECTOR);
        $this->clearCache(self::CACHE_KEY_XPATH);
        $this->clearCache(self::CACHE_KEY_CSS_DECLARATIONS_BLOCK);
        $this->clearCache(self::CACHE_KEY_COMBINED_STYLES);
    }
683403
def invalidate(self):
        """"""

        cache.delete(self.PAGE_LANGUAGES_KEY % (self.id))
        cache.delete('PAGE_FIRST_ROOT_ID')
        self._languages = None
        self._complete_slug = None
        self._content_dict = dict()

        p_names = [p.name for p in get_placeholders(self.get_template())]
        if 'slug' not in p_names:
            p_names.append('slug')
        if 'title' not in p_names:
            p_names.append('title')
        # delete content cache, frozen or not
        for name in p_names:
            # frozen
            cache.delete(PAGE_CONTENT_DICT_KEY % (self.id, name, 1))
            # not frozen
            cache.delete(PAGE_CONTENT_DICT_KEY % (self.id, name, 0))

        cache.delete(self.PAGE_URL_KEY % (self.id))
523147
def get_cached_menus():
    """"""
    items = cache.get(CACHE_KEY)
    if items is None:
        menu = generate_menu()
        cache.set(CACHE_KEY, menu.items)
    else:
        menu = Menu(items)
    return menu
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';
		
	}
1365621
private void resetMenuItems(boolean enable) {
        for (int i = 0; i < severityItemList.length; ++i) {
            MenuItem menuItem = severityItemList[i];
            menuItem.setEnabled(enable);
            menuItem.setSelection(false);
        }
    }
1090673
protected void reset() {
    attributeStatics = new StringBuilder();
    functionGroupStatics = new StringBuilder();
    properties = new StringBuilder();
    constructor = new StringBuilder();
    gettersSetters = new StringBuilder();
    equals = new StringBuilder();
    hashCode = new StringBuilder();
    toString = new StringBuilder();
    footer = new StringBuilder();
  }
877903
function() {
			var oLocale = this.oConfiguration.getLocale();
			oLocale ? html.setAttribute("lang", oLocale.toString()) : html.removeAttribute("lang");
		}
629185
public function reset()
    {
        $this->choiceCounter = 0;
        $this->setExploration(new SplStack());
        $this->setExplorationMarker(array());
        $this->setLastRendering(null);
        $this->setRenderingStack(new SplStack());
        $this->setXmlBaseStack(new SplStack());
        $this->setDocument(new DOMDocument('1.0', 'UTF-8'));
        $this->setStylesheets($this->getDocument()->createDocumentFragment());
        $this->setCurrentInteraction(null);
    }
852056
static function clearTemplateOverrideCache( $cacheItem )
    {
        $cachePath = eZSys::cacheDirectory() . '/' . $cacheItem['path'];
        eZDir::recursiveDelete( $cachePath );
        eZTemplateDesignResource::clearInMemoryOverrideArray();
    }
179928
public void deleteTemplate(ThymeLeafTemplateImplementation template) {
        // 1 - unregister the service
        try {
            ServiceRegistration reg = registrations.remove(template);
            if (reg != null) {
                reg.unregister();
            }
        } catch (Exception e) { //NOSONAR
            // May already have been unregistered during the shutdown sequence.
        }

        // 2 - as templates can have dependencies, and expressions kept in memory, we clear all caches.
        // Despite this may really impact performance, it should not happen too often on real systems.
        synchronized (this) {
            engine.getCacheManager().clearAllCaches();
        }
        OgnlRuntime.clearCache();
        // Unfortunately, the previous method do not clear the get and set method cache
        // (ognl.OgnlRuntime.cacheGetMethod and ognl.OgnlRuntime.cacheSetMethod)
        clearMethodCaches();
    }
1011474
def reset!
      if RSpec.configuration.server_runner_clear_cookbooks
        @server.clear_data
        @cookbooks_uploaded = false
      else
        # If we don't want to do a full clear, iterate through each value that we
        # set and manually remove it.
        @data_loaded.each do |key, names|
          if key == "data"
            names.each { |n| @server.data_store.delete_dir(["organizations", "chef", key, n]) }
          else
            names.each { |n| @server.data_store.delete(["organizations", "chef", key, n]) }
          end
        end
      end
      @data_loaded = {}
    end
519950
def clear_cache(cls):
        """"""
        #Prevent tkinter errors on python 2 ??
        for key in cls._cached:
            cls._cached[key] = None
        cls._cached = {}