private function resetCraftSitesServiceGroupsCache()
    {
        $obj = Craft::$app->sites;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_fetchedAllGroups')) {
            $refProperty = $refObject->getProperty('_fetchedAllGroups');
            $refProperty->setAccessible(true);
            $refProperty->setValue($obj, false);
        }
    }
private function resetCraftSitesServiceGroupsCache()
    {
        $obj = Craft::$app->sites;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_fetchedAllGroups')) {
            $refProperty = $refObject->getProperty('_fetchedAllGroups');
            $refProperty->setAccessible(true);
            $refProperty->setValue($obj, false);
        }
    }
private function resetCraftSitesServiceGroupsCache ( ) { $ obj = Craft :: $ app -> sites ; $ refObject = new \ ReflectionObject ( $ obj ) ; if ( $ refObject -> hasProperty ( '_fetchedAllGroups' ) ) { $ refProperty = $ refObject -> getProperty ( '_fetchedAllGroups' ) ; $ refProperty -> setAccessible ( true ) ; $ refProperty -> setValue ( $ obj , false ) ; } }
Reset craft site service groups cache using reflection.
Reset craft site service groups cache using reflection .