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);
        }
    }
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);
        }
    }
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 ) ; } }
Reset craft fields service groups cache using reflection.
Reset craft fields service groups cache using reflection .