Clear menu cache when changing menu structure
776603
def save_model(self, request, obj, form, change):
        
        if 'config.menu_structure' in form.changed_data:
            from menus.menu_pool import menu_pool
            menu_pool.clear(all=True)
        return super(BlogConfigAdmin, self).save_model(request, obj, form, change)
519950
def clear_cache(cls):
        """"""
        #Prevent tkinter errors on python 2 ??
        for key in cls._cached:
            cls._cached[key] = None
        cls._cached = {}
912367
def clear(self):
        """"""
        if self._cache is not None:
            with self._cache as c, self._out as out:
                self.in_flush_all = True
                c.clear()
                out.clear()  # pylint: disable=no-member
                self.in_flush_all = False
869421
private function clearSiteCaches()
    {
        $obj = Craft::$app->sites;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_sitesById')) {
            $refProperty1 = $refObject->getProperty('_sitesById');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
        if ($refObject->hasProperty('_sitesByHandle')) {
            $refProperty2 = $refObject->getProperty('_sitesByHandle');
            $refProperty2->setAccessible(true);
            $refProperty2->setValue($obj, null);
        }
        $obj->init(); // reload sites
    }
354524
protected function _delete_all_cache() {
		$locations = get_registered_nav_menus();

		if ( $locations && is_array( $locations ) ) {
			$locations = array_keys( $locations );
			foreach ( $locations as $location_id ) {
				if ( ! $this->_is_caching_nav_menu( $location_id ) ) {
					continue;
				}

				delete_transient( $this->_get_transient_id( $location_id ) );
			}
		}
	}
584838
function() {
            var s = Storage.storage();
            if (s == null) {
                return false;
            }
            Object.keys(s).forEach(function(key){
                if (key.indexOf("cache_") == 0 && key.indexOf("cache_"+configs.revision) ) {
                    s.removeItem(key);
                }
            });
        }
962824
private void clearPrefOnBranchKeyChange() {
        // If stored key isn't the same as the current key, we need to clean up
        // Note: Link Click Identifier is not cleared because of the potential for that to mess up a deep link
        String linkClickID = getLinkClickID();
        String linkClickIdentifier = getLinkClickIdentifier();
        String appLink = getAppLink();
        String pushIdentifier = getPushIdentifier();
        prefsEditor_.clear();
        
        setLinkClickID(linkClickID);
        setLinkClickIdentifier(linkClickIdentifier);
        setAppLink(appLink);
        setPushIdentifier(pushIdentifier);
        prefHelper_.prefsEditor_.apply();
    }
1143599
void clear() {

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

        // Hide previous drops
        this.hide();

        // Toggle the menu
        var node = $(e.currentTarget),
            menu = this.loadElement(node);

        if (!menu.is(':shown')) {
            this.show(node);

        } else {
            this.hide();
        }
    }
641319
public function delete_cache($id_menu){
    $this->options->delete_cache($this->from_path('menus'), true);
    return $this->cache_delete($id_menu);
  }
484373
public function resetCache()
    {
        $aTemplates = $this->getModule()->getTemplates();
        $oUtils = Registry::getUtils();
        $oUtils->resetTemplateCache($aTemplates);
        $oUtils->resetLanguageCache();
        $oUtils->resetMenuCache();

        ModuleVariablesLocator::resetModuleVariables();

        $this->_clearApcCache();
    }
1019718
public static void deletePersistentMenu() {
		CallToActionsRequest request = new CallToActionsRequest(
				ThreadState.EXISTING_THREAD, null);
		FbBotMillNetworkController.deleteThreadSetting(request);
	}
734780
function clearCache() {
  cache_stopById.clear();
  cache_stopByName.clear();
  cache_stopByStatusId.clear();
  cache_stops.clear();
  cache_stopsByRoute.clear();
}
856842
static function clearAllContentCache( $ignoreINISettings = false )
    {
        if ( !$ignoreINISettings )
        {
            $ini = eZINI::instance();
            $viewCacheEnabled = ( $ini->variable( 'ContentSettings', 'ViewCaching' ) === 'enabled' );
            $templateCacheEnabled = ( $ini->variable( 'TemplateSettings', 'TemplateCache' ) === 'enabled' );
        }
        else
        {
            $viewCacheEnabled = true;
            $templateCacheEnabled = true;
        }

        if ( $viewCacheEnabled || $templateCacheEnabled )
        {
            // view cache and/or ordinary template block cache
            eZContentObject::expireAllCache();

            ezpEvent::getInstance()->notify( 'content/cache/all' );

            // subtree template block caches
            if ( $templateCacheEnabled )
            {
                eZSubtreeCache::cleanupAll();
            }
        }
    }
729067
function resetCache()
    {
        if ( $this->CacheFile && file_exists( $this->CacheFile ) )
            unlink( $this->CacheFile );
        if ( $this->PlacementCacheFile && file_exists( $this->PlacementCacheFile ) )
            unlink( $this->PlacementCacheFile );
    }
449741
def security_cleanup(self, baseviews, menus):
        
        viewsmenus = self.get_all_view_menu()
        roles = self.get_all_roles()
        for viewmenu in viewsmenus:
            found = False
            for baseview in baseviews:
                if viewmenu.name == baseview.__class__.__name__:
                    found = True
                    break
            if menus.find(viewmenu.name):
                found = True
            if not found:
                permissions = self.find_permissions_view_menu(viewmenu)
                for permission in permissions:
                    for role in roles:
                        self.del_permission_role(role, permission)
                    self.del_permission_view_menu(
                        permission.permission.name, viewmenu.name
                    )
                self.del_view_menu(viewmenu.name)
290189
def clean_cache(self, request):
        
        treenav.delete_cache()
        self.message_user(request, _('Cache menuitem cache cleaned successfully.'))
        info = self.model._meta.app_label, self.model._meta.model_name
        changelist_url = reverse('admin:%s_%s_changelist' % info, current_app=self.admin_site.name)
        return redirect(changelist_url)