Author Topic

Jérôme Vieilledent

Monday 16 August 2010 2:50:30 pm

Comment60786

Hello

Exponential uses an in-memory cache for optimizations. If you want to iterate a long list of nodes/objects, you need to clear this cache :

$nodes = eZContentObjectTreeNode::subTreeByNodeID(null, 2283);
$existing = array();
foreach($nodes as $node){
 
    if($node->ClassIdentifier == "myclass"){
 
        $dm = $node->DataMap();      
        $existing[$dm["n_siren"]->DataText.$dm["siret"]->DataText] = $node->NodeID;
 
    }
 
    $node->object()->resetDataMap();
    eZContentObject::clearCache( array( $node->attribute( 'contentobject_id' ) ) );
 
}