public static function cacheIncludedRoles( core_kernel_classes_Resource $role, $includedRoles)
    {
        // Make a simple array of URIs with the included roles.
        $toCache = array();
        foreach ($includedRoles as $resource){
        	$toCache[] = $resource->getUri();
        }
        
        $serial = self::buildIncludedRolesSerial($role);
        $cache = ServiceManager::getServiceManager()->get('generis/cache');
        try{
        	$cache->put($toCache, $serial);
        	$returnValue = true;
        }
        catch (common_Exception $e){
        	$roleUri = $role->getUri();
        	$msg = "An error occurred while writing included roles in the cache memory for Role '${roleUri}': ";
        	$msg.= $e->getMessage();
        	throw new core_kernel_users_CacheException($msg);
        }
        

        return (bool) $returnValue;
    }