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;
    }
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;
    }
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 ; }
Put roles included in a Generis Role in the Cache memory.

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>

@param  core_kernel_classes_Resource $role
@param  array $includedRoles

@return bool
@throws \oat\oatbox\service\ServiceNotFoundException
@throws common_Exception
@throws core_kernel_users_CacheException
Put roles included in a Generis Role in the Cache memory .