Reset craft global sets cache using reflection.
775317
public function afterImport()
    {
        $obj = Craft::$app->globals;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_allGlobalSets')) {
            $refProperty1 = $refObject->getProperty('_allGlobalSets');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
    }
626674
public static function reset()
    {
        if (empty(self::$initialState)) {
            self::$initialState = get_class_vars(Inflector::class);
            return;
        }
        foreach (self::$initialState as $key => $val) {
            if ($key != 'initialState') {
                self::${$key} = $val;
            }
        }
        self::$cache = [];
    }
521191
def reset(self):
        """"""
        with self.lock:
            if self.cache:
                if self.use_tmp:
                    shutil.rmtree(self.tmp_dir, ignore_errors=True)
                else:
                    self.templates = {}
476452
static void reset() {
    activityIdMap.clear();
    for (ActivityScopedCache scopedCache : activityScopedCacheMap.values()) {
      scopedCache.clear();
    }

    activityScopedCacheMap.clear();
  }
1304614
public static void cleanup ()
  {
    // Reinitialize singletons to the default values
    if (LocaleCache.isInstantiated ())
      LocaleCache.getInstance ().reinitialize ();
    if (CountryCache.isInstantiated ())
      CountryCache.getInstance ().reinitialize ();
    if (LanguageCache.isInstantiated ())
      LanguageCache.getInstance ().reinitialize ();
    if (SerializationConverterRegistry.isInstantiated ())
      SerializationConverterRegistry.getInstance ().reinitialize ();
    if (MimeTypeDeterminator.isInstantiated ())
      MimeTypeDeterminator.getInstance ().reinitialize ();
    if (ThirdPartyModuleRegistry.isInstantiated ())
      ThirdPartyModuleRegistry.getInstance ().reinitialize ();
    if (TypeConverterRegistry.isInstantiated ())
      TypeConverterRegistry.getInstance ().reinitialize ();
    if (URLProtocolRegistry.isInstantiated ())
      URLProtocolRegistry.getInstance ().reinitialize ();
    if (EqualsImplementationRegistry.isInstantiated ())
      EqualsImplementationRegistry.getInstance ().reinitialize ();
    if (HashCodeImplementationRegistry.isInstantiated ())
      HashCodeImplementationRegistry.getInstance ().reinitialize ();

    // Clear caches
    if (DefaultTextResolver.isInstantiated ())
      DefaultTextResolver.getInstance ().clearCache ();
    EnumHelper.clearCache ();
    ResourceBundleHelper.clearCache ();
    if (RegExCache.isInstantiated ())
      RegExCache.getInstance ().clearCache ();
    CollatorHelper.clearCache ();
    LocaleHelper.clearCache ();
    StatisticsManager.clearCache ();
    SystemProperties.clearWarnedPropertyNames ();
    if (ImageDataManager.isInstantiated ())
      ImageDataManager.getInstance ().clearCache ();

    // Clean this one last as it is used in equals and hashCode implementations!
    ClassHierarchyCache.clearCache ();
  }
210098
public static function resetCache()
    {
        parent::$_aArticleVendors = array();
        parent::$_aArticleManufacturers = array();
        parent::$_aLoadedParents = null;
        parent::$_aSelList = null;
    }
1080606
static function resetGlobals( $fileName = 'site.ini', $rootDir = 'settings', $useLocalOverrides = null )
    {
        self::resetInstance( $fileName, $rootDir, $useLocalOverrides );
    }
379525
def reset(self):
        """"""
        paths = []
        for filename in os.listdir(self.cached_repo):
            if filename.startswith(".git"):
                continue
            path = os.path.join(self.cached_repo, filename)
            if os.path.isfile(path):
                paths.append(path)
            elif os.path.isdir(path):
                for model in os.listdir(path):
                    paths.append(os.path.join(path, model))
        git.remove(self.cached_repo, paths)
        self.contents = {"models": {}, "meta": {}}
578243
public static function reset_all_data() {
        // Reset database.
        self::reset_database();

        // Purge dataroot directory.
        self::reset_dataroot();

        // Reset all static caches.
        accesslib_clear_all_caches(true);
        accesslib_reset_role_cache();
        // Reset the nasty strings list used during the last test.
        nasty_strings::reset_used_strings();

        filter_manager::reset_caches();

        // Reset course and module caches.
        if (class_exists('format_base')) {
            // If file containing class is not loaded, there is no cache there anyway.
            format_base::reset_course_cache(0);
        }
        get_fast_modinfo(0, 0, true);

        // Inform data generator.
        self::get_data_generator()->reset();

        // Initialise $CFG with default values. This is needed for behat cli process, so we don't have modified
        // $CFG values from the old run. @see set_config.
        initialise_cfg();
    }
160947
def reset(target, settings):
    
    target_settings = _import_module(target)
    for k, v in settings.items():
        if hasattr(target_settings, k):
            setattr(target_settings, k, _get_value(getattr(target_settings, k), v))
        else:
            logger.debug('AttributeError {target} has no attribute {k}'.format(target=target, k=k))
    return target_settings
1028615
def clear_to_reset(self, config_vars):
        """"""

        super(TileManagerState, self).clear_to_reset(config_vars)
        self.registered_tiles = self.registered_tiles[:1]
        self.safe_mode = False
        self.debug_mode = False
1155822
private function resetCraftFieldsServiceGroupsCache()
    {
        $obj = Craft::$app->fields;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_fetchedAllGroups')) {
            $refProperty = $refObject->getProperty('_fetchedAllGroups');
            $refProperty->setAccessible(true);
            $refProperty->setValue($obj, false);
        }
    }
528657
def invalidate_caches(cls):
        """"""
        for finder in sys.path_importer_cache.values():
            if hasattr(finder, 'invalidate_caches'):
                finder.invalidate_caches()
1062601
public void resetInsideClassCache() {
    final Map<Class<?>, Field[]> fieldz = cachedClasses;
    if (fieldz != null) {
      synchronized (fieldz) {
        fieldz.clear();
      }
    }
  }
541785
def reset_rammbock(self):
        
        for client in self._clients:
            client.close()
        for server in self._servers:
            server.close()
        self._init_caches()
1305101
def reset(cls, *args, **kwargs):
        """"""
        cls.local.tchannel = None
        cls.args = None
        cls.kwargs = None
        cls.prepared = False
1274379
def clean_cache(cached, **kwargs):
    "  "

    if isinstance(cached, basestring):
        cached = _str_to_model(cached)

    cache_key = generate_cache_key(cached, **kwargs)
    cache.delete(cache_key)