src/PeskyCMF/Config/CmfConfig.php
static protected function getCacheKeyForOptimizedUiTemplatesBasedOnUserRole($group): string {
        if (static::getAuthModule()->getAccessPolicyClassName() === CmfAccessPolicy::class) {
            $userId = 'any';
        } else {
            $userId = 'not_authenticated';
            $user = static::getUser();
            if ($user && $user->existsInDb()) {
                if ($user::hasColumn('is_superadmin')) {
                    $userId = '__superadmin__';
                } else if ($user::hasColumn('role')) {
                    $userId = $user->role;
                } else {
                    $userId = 'user';
                }
            }
        }
        return static::url_prefix() . '_templates_' . static::getShortLocale() . '_' . $group . '_user_' . $userId;
    }
static protected function getCacheKeyForOptimizedUiTemplatesBasedOnUserRole($group): string {
        if (static::getAuthModule()->getAccessPolicyClassName() === CmfAccessPolicy::class) {
            $userId = 'any';
        } else {
            $userId = 'not_authenticated';
            $user = static::getUser();
            if ($user && $user->existsInDb()) {
                if ($user::hasColumn('is_superadmin')) {
                    $userId = '__superadmin__';
                } else if ($user::hasColumn('role')) {
                    $userId = $user->role;
                } else {
                    $userId = 'user';
                }
            }
        }
        return static::url_prefix() . '_templates_' . static::getShortLocale() . '_' . $group . '_user_' . $userId;
    }
Role-based cache key
@param string $group
@return string