Index: autoload/ezp_kernel.php
===================================================================
--- autoload/ezp_kernel.php	(revision 20548)
+++ autoload/ezp_kernel.php	(working copy)
@@ -276,6 +276,7 @@
       'eZNotificationSchedule'             => 'kernel/classes/notification/eznotificationschedule.php',
       'eZNotificationTransport'            => 'kernel/classes/notification/eznotificationtransport.php',
       'eZNullDB'                           => 'lib/ezdb/classes/eznulldb.php',
+      'eZObjectCache'                      => 'kernel/classes/ezobjectcache.php',
       'eZObjectForwarder'                  => 'kernel/common/ezobjectforwarder.php',
       'eZObjectRelationListType'           => 'kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php',
       'eZObjectRelationType'               => 'kernel/classes/datatypes/ezobjectrelation/ezobjectrelationtype.php',
Index: kernel/classes/datatypes/ezxmltext/ezxmltexttype.php
===================================================================
--- kernel/classes/datatypes/ezxmltext/ezxmltexttype.php	(revision 20548)
+++ kernel/classes/datatypes/ezxmltext/ezxmltexttype.php	(working copy)
@@ -529,10 +529,10 @@
             }
             elseif ( $nodeID )
             {
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                if ( is_array( $node ) )
+                $treeNode = eZContentObjectTreeNode::fetch( $nodeID );
+                if ( $node )
                 {
-                    $node->setAttribute( 'node_remote_id', $node['remote_id'] );
+                    $node->setAttribute( 'node_remote_id', $treeNode->attribute('remote_id') );
                 }
                 $node->removeAttribute( 'node_id' );
             }
@@ -673,11 +673,11 @@
                 // add as related object
                 if ( $contentObject )
                 {
-                    $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
+                    $node = eZContentObjectTreeNode::fetch( $nodeID );
                     if ( $node )
                     {
                         $relationType = $node->nodeName == 'link' ? eZContentObject::RELATION_LINK : eZContentObject::RELATION_EMBED;
-                        $contentObject->addContentObjectRelation( $node['contentobject_id'], $objectAttribute->attribute( 'version' ), 0, $relationType );
+                        $contentObject->addContentObjectRelation( $node->attribute('contentobject_id'), $objectAttribute->attribute( 'version' ), 0, $relationType );
                     }
                 }
             }
Index: kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmleditoutput.php
===================================================================
--- kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmleditoutput.php	(revision 20548)
+++ kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmleditoutput.php	(working copy)
@@ -498,8 +498,8 @@
         if ( $showPath == 'true' )
         {
             //include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
-            $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-            $href = $node ? 'eznode://' . $node['path_identification_string'] : 'eznode://' . $nodeID;
+            $node = eZContentObjectTreeNode::fetch( $nodeID );
+            $href = $node ? 'eznode://' . $node->attribute('url_alias') : 'eznode://' . $nodeID;
         }
         else
         {
Index: kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinputparser.php
===================================================================
--- kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinputparser.php	(revision 20548)
+++ kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinputparser.php	(working copy)
@@ -706,7 +706,7 @@
                 if ( ereg( "^[0-9]+$", $nodePath ) )
                 {
                     $nodeID = $nodePath;
-                    $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
+                    $node = eZContentObjectTreeNode::fetch( $nodeID );
                     if ( !$node )
                     {
                         $this->handleError( eZXMLInputParser::ERROR_DATA, "Node '%1' does not exist.",
@@ -714,7 +714,7 @@
                     }
                     else
                     {
-                        $objectID = $node['contentobject_id'];
+                        $objectID = $node->attribute('contentobject_id');
                     }
                 }
                 else
@@ -853,7 +853,7 @@
                 if ( ereg( "^[0-9]+$", $nodePath ) )
                 {
                     $nodeID = $nodePath;
-                    $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
+                    $node = eZContentObjectTreeNode::fetch( $nodeID );
                     if ( !$node )
                     {
                         $this->handleError( eZXMLInputParser::ERROR_DATA, "Node '%1' does not exist.",
Index: kernel/classes/ezcontentcachemanager.php
===================================================================
--- kernel/classes/ezcontentcachemanager.php	(revision 20548)
+++ kernel/classes/ezcontentcachemanager.php	(working copy)
@@ -810,11 +810,11 @@
                 {
                     if ( $useURLAlias )
                     {
-                        $aNode = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                        if ( !isset( $aNode ) )
+                        $aNode = eZContentObjectTreeNode::fetch( $nodeID );
+                        if ( !$aNode )
                             continue;
 
-                        $urlAlias = $aNode['path_identification_string'];
+                        $urlAlias = $aNode->attribute('path_identification_string');
                         if ( $pathPrefix != '' )
                         {
                             $tempAlias = substr( $pathPrefix, strlen( $pathPrefix ) -1 ) == '/'
Index: kernel/classes/ezcontentclass.php
===================================================================
--- kernel/classes/ezcontentclass.php	(revision 20548)
+++ kernel/classes/ezcontentclass.php	(working copy)
@@ -811,6 +811,9 @@
         // If we are not allowed to remove just return false
         if ( $this->Version != eZContentClass::VERSION_STATUS_TEMPORARY && !$this->isRemovable() )
             return false;
+            
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentobjectclass',  $this->ID);
 
         if ( is_array( $removeAttributes ) or $removeAttributes )
             $this->removeAttributes( $removeAttributes );
@@ -943,8 +946,8 @@
     function store( $store_childs = false, $fieldFilters = null )
     {
 
-        global $eZContentClassObjectCache;
-        unset( $eZContentClassObjectCache[$this->ID] );
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentobjectclass', $this->ID);
 
         $db = eZDB::instance();
         $db->begin();
@@ -1108,6 +1111,13 @@
 
     static function exists( $id, $version = eZContentClass::VERSION_STATUS_DEFINED, $userID = false, $useIdentifier = false )
     {
+        $cache = eZObjectCache::getInstance();
+        $class = $cache->fetch('ezcontentobjectclass', $id, $version);
+        if ( $class !== null)
+        {
+            return $class->ID;
+        }
+
         $conds = array( "version" => $version );
         if ( $useIdentifier )
             $conds["identifier"] = $id;
@@ -1132,11 +1142,16 @@
 
     static function fetch( $id, $asObject = true, $version = eZContentClass::VERSION_STATUS_DEFINED, $user_id = false ,$parent_id = null )
     {
-        global $eZContentClassObjectCache;
+        $contentClass = null;
+        if ( $asObject and $version === eZContentClass::VERSION_STATUS_DEFINED )
+        {
+            $cache = eZObjectCache::getInstance();
+            $contentClass = $cache->fetch('ezcontentobjectclass', $id, $version);
+        }
 
         // If the object given by its id is not cached or should be returned as array
         // then we fetch it from the DB (objects are always cached as arrays).
-        if ( !isset( $eZContentClassObjectCache[$id] ) or $asObject === false or $version != eZContentClass::VERSION_STATUS_DEFINED )
+        if ( $contentClass === null )
         {
             $conds = array( "id" => $id,
                         "version" => $version );
@@ -1167,9 +1182,9 @@
             if ( $asObject )
             {
                 $contentClass = new eZContentClass( $row );
-                if ( $version == eZContentClass::VERSION_STATUS_DEFINED )
+                if ( isset( $cache ) )
                 {
-                    $eZContentClassObjectCache[$id] = $contentClass;
+                    $cache->store('ezcontentobjectclass', $contentClass, $id, $version);
                 }
                 return $contentClass;
             }
@@ -1176,11 +1191,6 @@
             else
                 $contentClass = $row;
         }
-        else
-        {
-            $contentClass = $eZContentClassObjectCache[$id];
-        }
-
         return $contentClass;
     }
 
@@ -1342,9 +1352,7 @@
             $version = $this->Version;
         }
 
-        return eZContentClassAttribute::fetchFilteredList( array( "contentclass_id" => $id,
-                                                                  "version" => $version ),
-                                                           $asObject );
+        return eZContentClassAttribute::fetchListByClassID( $id, $version, $asObject );
     }
 
     /*!
Index: kernel/classes/ezcontentclassattribute.php
===================================================================
--- kernel/classes/ezcontentclassattribute.php	(revision 20548)
+++ kernel/classes/ezcontentclassattribute.php	(working copy)
@@ -251,12 +251,9 @@
             return false;
         }
 
-        global $eZContentClassAttributeCacheListFull;
-        unset( $eZContentClassAttributeCacheListFull );
-        global $eZContentClassAttributeCacheList;
-        unset( $eZContentClassAttributeCacheList[$this->attribute( 'contentclass_id' )] );
-        global $eZContentClassAttributeCache;
-        unset( $eZContentClassAttributeCache[$this->ID] );
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentobjectclassattribute', $this->ID);
+        $cache->clear('ezcontentobjectclassattribute_list', $this->attribute( 'contentclass_id' ));
 
         $dataType->preStoreClassAttribute( $this, $this->attribute( 'version' ) );
 
@@ -283,12 +280,10 @@
             return false;
         }
 
-        global $eZContentClassAttributeCacheListFull;
-        unset( $eZContentClassAttributeCacheListFull );
-        global $eZContentClassAttributeCacheList;
-        unset( $eZContentClassAttributeCacheList[$this->attribute( 'contentclass_id' )] );
-        global $eZContentClassAttributeCache;
-        unset( $eZContentClassAttributeCache[$this->ID] );
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentobjectclassattribute', $this->ID);
+        $cache->clear('ezcontentobjectclassattribute_list', $this->attribute( 'contentclass_id' ));
+
 
         $db = eZDB::instance();
         $db->begin();
@@ -315,12 +310,9 @@
         $dataType = $this->dataType();
         if ( $dataType->isClassAttributeRemovable( $this ) )
         {
-            global $eZContentClassAttributeCacheListFull;
-            unset( $eZContentClassAttributeCacheListFull );
-            global $eZContentClassAttributeCacheList;
-            unset( $eZContentClassAttributeCacheList[$this->attribute( 'contentclass_id' )] );
-            global $eZContentClassAttributeCache;
-            unset( $eZContentClassAttributeCache[$this->ID] );
+            $cache = eZObjectCache::getInstance();
+            $cache->clear('ezcontentobjectclassattribute', $this->ID);
+            $cache->clear('ezcontentobjectclassattribute_list', $this->attribute( 'contentclass_id' ));
 
             $db = eZDB::instance();
             $db->begin();
@@ -342,10 +334,10 @@
     static function fetch( $id, $asObject = true, $version = eZContentClass::VERSION_STATUS_DEFINED, $field_filters = null )
     {
         $object = null;
-        if ( $field_filters === null and $asObject and
-             isset( $GLOBALS['eZContentClassAttributeCache'][$id][$version] ) )
+        if ( $field_filters === null and $asObject )
         {
-            $object = $GLOBALS['eZContentClassAttributeCache'][$id][$version];
+            $cache = eZObjectCache::getInstance();
+            $object = $cache->fetch('ezcontentobjectclassattribute', $id, $version);
         }
         if ( $object === null )
         {
@@ -354,9 +346,9 @@
                                                        array( 'id' => $id,
                                                               'version' => $version ),
                                                        $asObject );
-            if ( $field_filters === null and $asObject )
+            if ( isset( $cache ) )
             {
-                $GLOBALS['eZContentClassAttributeCache'][$id][$version] = $object;
+                $objects = $cache->store('ezcontentobjectclassattribute', $object, $id, $version);
             }
         }
         return $object;
@@ -367,43 +359,27 @@
         $parameters = array_merge( array( 'data_type' => false,
                                           'version' => false ),
                                    $parameters );
-        $dataType = $parameters['data_type'];
-        $version = $parameters['version'];
-        $objects = null;
-        if ( $asObject &&
-             $dataType === false &&
-             $version === false )
+        $conditions = null;
+        if ( $parameters['data_type'] !== false or
+             $parameters['version'] !== false )
         {
-            $objects = $GLOBALS['eZContentClassAttributeCacheListFull'];
+            $conditions = array();
+            if ( $parameters['data_type'] !== false )
+                $conditions['data_type_string'] = $parameters['data_type'];
+            if ( $parameters['version'] !== false )
+                $conditions['version'] = $parameters['version'];
         }
-        if ( !isset( $objects ) or
-             $objects === null )
+        $objects = eZPersistentObject::fetchObjectList( eZContentClassAttribute::definition(),
+                                                            null, $conditions, null, null,
+                                                            $asObject );
+        if ( $asObject )
         {
-            $conditions = null;
-            if ( $dataType !== false or
-                 $version !== false )
+            $cache = eZObjectCache::getInstance();
+            foreach ( $objects as $objectItem )
             {
-                $conditions = array();
-                if ( $dataType !== false )
-                    $conditions['data_type_string'] = $dataType;
-                if ( $version !== false )
-                    $conditions['version'] = $version;
-            }
-            $objects = eZPersistentObject::fetchObjectList( eZContentClassAttribute::definition(),
-                                                                null, $conditions, null, null,
-                                                                $asObject );
-            if ( $asObject )
-            {
-                foreach ( $objects as $objectItem )
-                {
-                    $objectID = $objectItem->ID;
-                    $objectVersion = $objectItem->Version;
-                    $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] = $objectItem;
-                }
-                if (  $dataType === false && $version === false )
-                {
-                    $GLOBALS['eZContentClassAttributeCacheListFull'] = $objects;
-                }
+                $objectID = $objectItem->ID;
+                $objectVersion = $objectItem->Version;
+                $cache->store('ezcontentobjectclassattribute', $objectItem, $objectID, $objectVersion);
             }
         }
         return $objects;
@@ -414,10 +390,11 @@
         $objects = null;
         if ( $asObject )
         {
-            $objects = $GLOBALS['eZContentClassAttributeCacheList'][$classID][$version];
+            $cache = eZObjectCache::getInstance();
+            $objects = $cache->fetch('ezcontentobjectclassattribute_list', $classID, $version);
         }
-        if ( !isset( $objects ) or
-             $objects === null )
+
+        if ( $objects === null )
         {
             $cond = array( 'contentclass_id' => $classID,
                            'version' => $version );
@@ -430,10 +407,9 @@
                 {
                     $objectID = $objectItem->ID;
                     $objectVersion = $objectItem->Version;
-                    if ( !isset( $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] ) )
-                        $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] = $objectItem;
+                    $cache->store('ezcontentobjectclassattribute', $objectItem, $objectID, $objectVersion);
                 }
-                $GLOBALS['eZContentClassAttributeCacheList'][$classID][$version] = $objects;
+                $cache->store('ezcontentobjectclassattribute_list', $objects, $classID, $version);
             }
         }
         return $objects;
@@ -446,6 +422,7 @@
                                                            $asObject );
         if ( $asObject )
         {
+            $cache = eZObjectCache::getInstance();
             foreach ( $objectList as $objectItem )
             {
                 $objectID = $objectItem->ID;
@@ -450,8 +427,7 @@
             {
                 $objectID = $objectItem->ID;
                 $objectVersion = $objectItem->Version;
-                if ( !isset( $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] ) )
-                    $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] = $objectItem;
+                $cache->store('ezcontentobjectclassattribute', $objectItem, $objectID, $objectVersion);
             }
         }
         return $objectList;
Index: kernel/classes/ezcontentfunctions.php
===================================================================
--- kernel/classes/ezcontentfunctions.php	(revision 20548)
+++ kernel/classes/ezcontentfunctions.php	(working copy)
@@ -43,9 +43,9 @@
 
         $contentObject = false;
 
-        $parentNode = eZContentObjectTreeNode::fetch( $parentNodeID, false, false );
+        $parentNode = eZContentObjectTreeNode::fetch( $parentNodeID );
 
-        if ( is_array( $parentNode ) )
+        if ( $parentNode )
         {
             $contentClass = eZContentClass::fetchByIdentifier( $classIdentifier );
             if ( is_object( $contentClass ) )
Index: kernel/classes/ezcontentobject.php
===================================================================
--- kernel/classes/ezcontentobject.php	(revision 20548)
+++ kernel/classes/ezcontentobject.php	(working copy)
@@ -257,12 +257,9 @@
     function store( $fieldFilters = null )
     {
         // Unset the cache
-        global $eZContentObjectContentObjectCache;
-        unset( $eZContentObjectContentObjectCache[$this->ID] );
-        global $eZContentObjectDataMapCache;
-        unset( $eZContentObjectDataMapCache[$this->ID] );
-        global $eZContentObjectVersionCache;
-        unset( $eZContentObjectVersionCache[$this->ID] );
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentobject_datamap', $this->ID);
+        $cache->clear('ezcontentobject', $this->ID);
 
         $db = eZDB::instance();
         $db->begin();
@@ -284,11 +281,11 @@
             $idArray = array( $idArray );
 
         // clear in-memory cache for all objects
+        $cache = eZObjectCache::getInstance();
         if ( count( $idArray ) == 0 )
         {
-            unset( $GLOBALS['eZContentObjectContentObjectCache'] );
-            unset( $GLOBALS['eZContentObjectDataMapCache'] );
-            unset( $GLOBALS['eZContentObjectVersionCache'] );
+            $cache->clear('ezcontentobject_datamap');
+            $cache->clear('ezcontentobject');
 
             return;
         }
@@ -294,14 +291,10 @@
         }
 
         // clear in-memory cache for specified object(s)
-        global $eZContentObjectContentObjectCache;
-        global $eZContentObjectDataMapCache;
-        global $eZContentObjectVersionCache;
         foreach ( $idArray as $objectID )
         {
-            unset( $eZContentObjectContentObjectCache[$objectID] );
-            unset( $eZContentObjectDataMapCache[$objectID] );
-            unset( $eZContentObjectVersionCache[$objectID] );
+            $cache->clear('ezcontentobject_datamap', $objectID);
+            $cache->clear('ezcontentobject', $objectID);
         }
     }
 
@@ -527,8 +520,6 @@
     */
     function fetchDataMap( $version = false, $language = false )
     {
-        // Global variable to cache datamaps
-        global $eZContentObjectDataMapCache;
 
         if ( $version == false )
             $version = $this->attribute( 'current_version' );
@@ -538,7 +529,8 @@
             $language = $this->CurrentLanguage;
         }
 
-        if ( !$language || !isset( $eZContentObjectDataMapCache[$this->ID][$version][$language] ) )
+
+        if ( !isset( $this->DataMap[$version][$language] ) )
         {
             $data = $this->contentObjectAttributes( true, $version, $language );
 
@@ -549,15 +541,7 @@
 
             // Store the attributes for later use
             $this->ContentObjectAttributeArray[$version][$language] = $data;
-            $eZContentObjectDataMapCache[$this->ID][$version][$language] = $data;
-        }
-        else
-        {
-            $data = $eZContentObjectDataMapCache[$this->ID][$version][$language];
-        }
 
-        if ( !isset( $this->DataMap[$version][$language] ) )
-        {
             $ret = array();
             foreach( $data as $key => $item )
             {
@@ -698,11 +682,17 @@
     */
     static function fetch( $id, $asObject = true )
     {
-        global $eZContentObjectContentObjectCache;
+        $obj = null;
+        if ( $asObject )
+        {
+            $cache = eZObjectCache::getInstance();
+            $obj = $cache->fetch('ezcontentobject', $id);
+
+        }
 
         // If the object given by its id is not cached or should be returned as array
         // then we fetch it from the DB (objects are always cached as arrays).
-        if ( !isset( $eZContentObjectContentObjectCache[$id] ) or $asObject === false )
+        if ( $obj === null )
         {
             $db = eZDB::instance();
 
@@ -723,7 +713,7 @@
             if ( $asObject )
             {
                 $obj = new eZContentObject( $objectArray );
-                $eZContentObjectContentObjectCache[$id] = $obj;
+                $cache->store('ezcontentobject', $obj, $id);
             }
             else
             {
@@ -729,13 +719,9 @@
             {
                 return $objectArray;
             }
+        }
+        return $obj;
 
-            return $obj;
-        }
-        else
-        {
-            return $eZContentObjectContentObjectCache[$id];
-        }
     }
 
     /*!
@@ -746,10 +732,8 @@
     */
     static function exists( $id )
     {
-        global $eZContentObjectContentObjectCache;
-
-        // Check the global cache
-        if ( isset( $eZContentObjectContentObjectCache[$id] ) )
+        $cache = eZObjectCache::getInstance();
+        if (  $cache->fetch('ezcontentobject', $id) !== null )
             return true;
 
         // If the object is not cached we need to check the DB
@@ -795,7 +779,6 @@
     */
     static function fetchByNodeID( $nodeID, $asObject = true )
     {
-        global $eZContentObjectContentObjectCache;
         $nodeID = (int)$nodeID;
 
         $useVersionName = true;
@@ -839,7 +822,8 @@
         if ( $asObject )
         {
             $obj = new eZContentObject( $objectArray );
-            $eZContentObjectContentObjectCache[$objectArray['id']] = $obj;
+            $cache = eZObjectCache::getInstance();
+            $cache->store('ezcontentobject', $obj, $objectArray['id']);
         }
         else
         {
@@ -870,7 +854,10 @@
         $db = eZDB::instance();
         // All elements from $uniqueIDArray should be casted to (int)
         $objectInSQL = $db->implodeWithTypeCast( ', ', $uniqueIDArray, 'int' );
-        $query = "SELECT ezcontentclass.serialized_name_list as class_serialized_name_list, ezcontentobject.* $versionNameTargets
+        $query = "SELECT ezcontentclass.serialized_name_list as class_serialized_name_list,
+                         ezcontentclass.identifier as contentclass_identifier,
+                         ezcontentclass.is_container as is_container,
+                         ezcontentobject.* $versionNameTargets
                       FROM
                          ezcontentclass,
                          ezcontentobject
@@ -883,6 +870,7 @@
         $resRowArray = $db->arrayQuery( $query );
 
         $objectRetArray = array();
+        $cache = eZObjectCache::getInstance();
         foreach ( $resRowArray as $resRow )
         {
             $objectID = $resRow['id'];
@@ -891,7 +879,7 @@
             {
                 $obj = new eZContentObject( $resRow );
                 $obj->ClassName = $resRow['class_name'];
-                $eZContentObjectContentObjectCache[$objectID] = $obj;
+                $cache->store('ezcontentobject', $obj, $objectID);
                 $objectRetArray[$objectID] = $obj;
             }
             else
@@ -985,20 +973,18 @@
     {
         if ( $asObject )
         {
-            global $eZContentObjectVersionCache;
+            $cache = eZObjectCache::getInstance();
+            $obj = $cache->fetch('ezcontentobject', $this->ID, $version);
 
-            if ( !isset( $eZContentObjectVersionCache ) ) // prevent PHP warning below
-                $eZContentObjectVersionCache = array();
-
-            if ( array_key_exists( $this->ID, $eZContentObjectVersionCache ) &&
-                 array_key_exists( $version, $eZContentObjectVersionCache[$this->ID] ) )
+            if ( $obj !== null )
             {
-                return $eZContentObjectVersionCache[$this->ID][$version];
+                return $obj;
             }
             else
             {
-                $eZContentObjectVersionCache[$this->ID][$version] = eZContentObjectVersion::fetchVersion( $version, $this->ID, $asObject );
-                return $eZContentObjectVersionCache[$this->ID][$version];
+                $verObj = eZContentObjectVersion::fetchVersion( $version, $this->ID, $asObject );
+                $cache->store('ezcontentobject', $verObj, $this->ID, $version);
+                return $verObj;
             }
         }
         else
@@ -1716,10 +1702,10 @@
         }
         else if ( $nodeID !== null )
         {
-            $node = eZContentObjectTreeNode::fetch( $nodeID , false, false);
-            if ( is_array( $node ) )
+            $node = eZContentObjectTreeNode::fetch( $nodeID );
+            if ( $node )
             {
-                if ( $node['main_node_id']  == $nodeID )
+                if ( $node->attribute('main_node_id')  == $nodeID )
                 {
                     $db = eZDB::instance();
                     $db->begin();
@@ -1849,6 +1835,9 @@
             $language = $this->CurrentLanguage;
         }
 
+        $returnAttributeArray = null;
+        $cache = eZObjectCache::getInstance();
+
         if ( is_string( $language ) )
             $language = $db->escapeString( $language );
 
@@ -1854,6 +1843,13 @@
 
         if ( $contentObjectAttributeID !== false )
             $contentObjectAttributeID =(int) $contentObjectAttributeID;
+        else if ( $asObject )
+            $returnAttributeArray = $cache->fetch('ezcontentobject_attributes', $this->ID, $version, $language);
+
+        if ( $returnAttributeArray )
+            return $returnAttributeArray;
+
+        //$cache->store('ezcontentobject_datamap', $data, $this->ID, $version, $language);
 //         print( "Attributes fetch $this->ID, $version" );
 
         if ( !$language || !isset( $this->ContentObjectAttributes[$version][$language] ) )
@@ -1906,6 +1902,7 @@
             if ( $language !== null and $version !== null )
             {
                 $this->ContentObjectAttributes[$version][$language] = $returnAttributeArray;
+                $cache->store('ezcontentobject_attributes', $returnAttributeArray, $this->ID, $version, $language);
             }
         }
         else
@@ -1936,7 +1933,6 @@
 
         if ( count( $nodeList ) > 0 )
         {
-            $objectArray = array();
             $tmpLanguageObjectList = array();
             $whereSQL = '';
             $count = count( $nodeList );
@@ -1947,9 +1943,6 @@
 
                 $language = $object->currentLanguage();
                 $tmpLanguageObjectList[$object->attribute( 'id' )] = $language;
-                $objectArray = array( 'id' => $object->attribute( 'id' ),
-                                      'language' => $language,
-                                      'version' => $node->attribute( 'contentobject_version' ) );
 
                 $whereSQL .= "( ezcontentobject_attribute.version = '" . $node->attribute( 'contentobject_version' ) . "' AND
                     ezcontentobject_attribute.contentobject_id = '" . $object->attribute( 'id' ) . "' AND
@@ -1980,6 +1973,7 @@
 
                 $tmpAttributeObjectList[$attr->attribute( 'contentobject_id' )][] = $attr;
             }
+            $cache = eZObjectCache::getInstance();
 
             foreach ( $nodeList as $node )
             {
@@ -1987,6 +1981,11 @@
                 $object->setContentObjectAttributes( $tmpAttributeObjectList[$object->attribute( 'id' )],
                                                      $node->attribute( 'contentobject_version' ),
                                                      $tmpLanguageObjectList[$object->attribute( 'id' )] );
+                $cache->store('ezcontentobject_attributes',
+                              $tmpAttributeObjectList[$object->attribute( 'id' )],
+                              $object->attribute( 'id' ),
+                              $node->attribute( 'contentobject_version' ),
+                              $tmpLanguageObjectList[$object->attribute( 'id' )] );
                 $node->setContentObject( $object );
             }
         }
@@ -3336,7 +3335,9 @@
         }
         $query = "SELECT ezcontentobject.*,
              ezcontentobject_tree.*,
-             ezcontentclass.serialized_name_list as class_serialized_name_list
+             ezcontentclass.serialized_name_list as class_serialized_name_list,
+             ezcontentclass.identifier as contentclass_identifier,
+             ezcontentclass.is_container as is_container
           FROM   ezcontentobject_tree,
              ezcontentobject,
              ezcontentclass
@@ -3816,8 +3817,8 @@
                             $mainNodeID = $this->attribute( 'main_node_id' );
                             foreach ( $limitationArray[$key] as $nodeID )
                             {
-                                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                                $limitationNodeID = $node['main_node_id'];
+                                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                                $limitationNodeID = $node->attribute('main_node_id');
                                 if ( $mainNodeID == $limitationNodeID )
                                 {
                                     $access = 'allowed';
@@ -3875,8 +3876,8 @@
                                 {
                                     foreach ( $parentNodes as $parentNode )
                                     {
-                                        $parentNode = eZContentObjectTreeNode::fetch( $parentNode, false, false );
-                                        $path = $parentNode['path_string'];
+                                        $parentNode = eZContentObjectTreeNode::fetch( $parentNode );
+                                        $path = $parentNode->attribute('path_string');
 
                                         $subtreeArray = $limitationArray[$key];
                                         foreach ( $subtreeArray as $subtreeString )
@@ -3937,8 +3938,8 @@
                                 {
                                     foreach ( $parentNodes as $parentNode )
                                     {
-                                        $parentNode = eZContentObjectTreeNode::fetch( $parentNode, false, false );
-                                        $path = $parentNode['path_string'];
+                                        $parentNode = eZContentObjectTreeNode::fetch( $parentNode );
+                                        $path = $parentNode->attribute('path_string');
 
                                         $subtreeArray = $limitationArray[$key];
                                         foreach ( $subtreeArray as $subtreeString )
@@ -4088,8 +4089,8 @@
             foreach( $policy['Node'] as $nodeID )
             {
                 $mainNodeID = $this->attribute( 'main_node_id' );
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                if ( $mainNodeID == $node['main_node_id'] )
+                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                if ( $mainNodeID == $node->attribute('main_node_id') )
                 {
                     $allowed = true;
                     $allowedNode = true;
Index: kernel/classes/ezcontentobjectassignmenthandler.php
===================================================================
--- kernel/classes/ezcontentobjectassignmenthandler.php	(revision 20548)
+++ kernel/classes/ezcontentobjectassignmenthandler.php	(working copy)
@@ -77,9 +77,9 @@
         if ( is_numeric( $name ) )
         {
             $nodeID = false;
-            $node = eZContentObjectTreeNode::fetch( $name, false, false );
+            $node = eZContentObjectTreeNode::fetch( $name );
             if ( $node )
-                $nodeID = $node['node_id'];
+                $nodeID = $node->attribute('node_id');
             return $nodeID;
         }
         $contentINI = eZINI::instance( 'content.ini' );
Index: kernel/classes/ezcontentobjecttreenode.php
===================================================================
--- kernel/classes/ezcontentobjecttreenode.php	(revision 20548)
+++ kernel/classes/ezcontentobjecttreenode.php	(working copy)
@@ -1337,12 +1337,12 @@
 
             foreach ( $nodeIDList as $nodeID )
             {
-                $node           = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                if ( !is_array( $node ) )
+                $node           = eZContentObjectTreeNode::fetch( $nodeID );
+                if ( !is_object( $node ) )
                     return false;
 
-                $nodePath       = $node['path_string'];
-                $nodeDepth      = $node['depth'];
+                $nodePath  = $node->attribute('path_string');
+                $nodeDepth = $node->attribute('depth');
                 $depthCond      = '';
                 if ( $depth )
                 {
@@ -1389,12 +1389,12 @@
             }
             else
             {
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                if ( !is_array( $node ) )
+                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                if ( !is_object( $node ) )
                     return false;
 
-                $nodePath   = $node['path_string'];
-                $nodeDepth  = $node['depth'];
+                $nodePath  = $node->attribute('path_string');
+                $nodeDepth = $node->attribute('depth');
             }
 
             $outNotEqParentStr   = eZContentObjectTreeNode::createNotEqParentSQLString( $nodeID, $depth, $depthOperator );
@@ -2200,9 +2200,9 @@
             $sqlPartForOneNodeList = array();
             foreach ( $nodeIDList as $nodeID )
             {
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
+                $node = eZContentObjectTreeNode::fetch( $nodeID );
                 // If the node doesn't exist we return null.
-                if ( !is_array( $node ) )
+                if ( !is_object( $node ) )
                 {
                     return null;
                 }
@@ -2207,8 +2207,8 @@
                     return null;
                 }
 
-                $nodePath = $node['path_string'];
-                $nodeDepth = $node['depth'];
+                $nodePath = $node->attribute('path_string');
+                $nodeDepth = $node->attribute('depth');
                 $childrensPath = $nodePath ;
                 $pathString = " ezcontentobject_tree.path_string like '$childrensPath%' ";
                 if ( isset( $params[ 'Depth' ] ) and $params[ 'Depth' ] > 0 )
@@ -2236,14 +2236,14 @@
 
             if ( is_numeric( $nodeID ) )
             {
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
+                $node = eZContentObjectTreeNode::fetch( $nodeID );
                 // If the node doesn't exist we return null.
-                if ( !is_array( $node ) )
+                if ( !is_object( $node ) )
                 {
                     return 0;
                 }
-                $nodePath = $node['path_string'];
-                $nodeDepth = $node['depth'];
+                $nodePath = $node->attribute('path_string');
+                $nodeDepth = $node->attribute('depth');
             }
 
             $fromNode = $nodeID;
@@ -3379,6 +3379,13 @@
     {
         $returnValue = null;
         $db = eZDB::instance();
+        $cache = eZObjectCache::getInstance();
+        if ( is_numeric($nodeID) && $asObject )
+        {
+            $returnValue = $cache->fetch('ezcontentobjecttreenode', $nodeID);
+            if ( $returnValue !== null) return $returnValue;
+        }
+
         if ( ( is_numeric( $nodeID ) && $nodeID == 1 ) ||
              ( is_array( $nodeID ) && count( $nodeID ) === 1 && $nodeID[0] == 1 ) )
         {
@@ -3471,7 +3478,10 @@
             {
                 $returnValue = eZContentObjectTreeNode::makeObjectsArray( $nodeListArray );
                 if ( count( $returnValue ) === 1 )
+                {
                     $returnValue = $returnValue[0];
+                    $cache->store('ezcontentobjecttreenode', $returnValue, $nodeListArray[0]['node_id']);
+                }
             }
             else
             {
@@ -4344,8 +4354,8 @@
         // Select count of all elements having reverse relations. And ignore those items that don't relate to objects other than being removed.
         foreach( $nodeIDArray as $nodeID )
         {
-            $contentObjectTreeNode = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-            $tempPathString = $contentObjectTreeNode['path_string'];
+            $contentObjectTreeNode = eZContentObjectTreeNode::fetch( $nodeID );
+            $tempPathString = $contentObjectTreeNode->attribute('path_string');
 
             // Create WHERE section
             $pathStringArray[] = "tree.path_string like '$tempPathString%'";
@@ -4943,8 +4953,8 @@
                             $mainNodeID = $currentNode->attribute( 'main_node_id' );
                             foreach ( $valueList as $nodeID )
                             {
-                                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                                $limitationNodeID = $node['main_node_id'];
+                                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                                $limitationNodeID = $node->attribute('main_node_id');
                                 if ( $mainNodeID == $limitationNodeID )
                                 {
                                     $access = 'allowed';
@@ -5135,8 +5145,8 @@
             foreach( $policy['Node'] as $nodeID )
             {
                 $mainNodeID = $this->attribute( 'main_node_id' );
-                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                if ( $mainNodeID == $node['main_node_id'] )
+                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                if ( $mainNodeID == $node->attribute('main_node_id') )
                 {
                     $allowed = true;
                     $allowedNode = true;
Index: kernel/classes/ezcontentobjectversion.php
===================================================================
--- kernel/classes/ezcontentobjectversion.php	(revision 20548)
+++ kernel/classes/ezcontentobjectversion.php	(working copy)
@@ -578,8 +578,8 @@
                             $contentObjectID = $this->attribute( 'contentobject_id' );
                             foreach ( $limitation as $nodeID )
                             {
-                                $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
-                                $limitationObjectID = $node['contentobject_id'];
+                                $node = eZContentObjectTreeNode::fetch( $nodeID );
+                                $limitationObjectID = $node->attribute('contentobject_id');
                                 if ( $contentObjectID == $limitationObjectID )
                                 {
                                     $access = 'allowed';
@@ -1164,45 +1164,56 @@
     */
     static function fetchAttributes( $version, $contentObjectID, $language = false, $asObject = true )
     {
-        $db = eZDB::instance();
-        $language = $db->escapeString( $language );
+        $cache = eZObjectCache::getInstance();
         $contentObjectID = (int) $contentObjectID;
         $version =(int) $version;
-        $query = "SELECT ezcontentobject_attribute.*, ezcontentclass_attribute.identifier as classattribute_identifier,
-                        ezcontentclass_attribute.can_translate, ezcontentclass_attribute.serialized_name_list as attribute_serialized_name_list
-                  FROM  ezcontentobject_attribute, ezcontentclass_attribute, ezcontentobject_version
-                  WHERE
-                    ezcontentclass_attribute.version = '0' AND
-                    ezcontentclass_attribute.id = ezcontentobject_attribute.contentclassattribute_id AND
-                    ezcontentobject_attribute.version = '$version' AND
-                    ezcontentobject_attribute.contentobject_id = '$contentObjectID' AND
-                    ezcontentobject_version.contentobject_id = '$contentObjectID' AND
-                    ezcontentobject_version.version = '$version' AND ".
-                    ( ( $language )? "ezcontentobject_attribute.language_code = '$language'": eZContentLanguage::sqlFilter( 'ezcontentobject_attribute', 'ezcontentobject_version' ) ).
-                  " ORDER by
-                    ezcontentclass_attribute.placement ASC";
 
-        $attributeArray = $db->arrayQuery( $query );
+        if ($asObject )
+        {
+            $returnAttributeArray = $cache->fetch('ezcontentobject_attributes', $contentObjectID, $version, $language);
+        }
 
-        $returnAttributeArray = array();
-        foreach ( $attributeArray as $attribute )
+        if ( $returnAttributeArray === null )
         {
-            $attr = new eZContentObjectAttribute( $attribute );
+            $db = eZDB::instance();
+            $language = $db->escapeString( $language );
+            $query = "SELECT ezcontentobject_attribute.*, ezcontentclass_attribute.identifier as classattribute_identifier,
+                            ezcontentclass_attribute.can_translate, ezcontentclass_attribute.serialized_name_list as attribute_serialized_name_list
+                      FROM  ezcontentobject_attribute, ezcontentclass_attribute, ezcontentobject_version
+                      WHERE
+                        ezcontentclass_attribute.version = '0' AND
+                        ezcontentclass_attribute.id = ezcontentobject_attribute.contentclassattribute_id AND
+                        ezcontentobject_attribute.version = '$version' AND
+                        ezcontentobject_attribute.contentobject_id = '$contentObjectID' AND
+                        ezcontentobject_version.contentobject_id = '$contentObjectID' AND
+                        ezcontentobject_version.version = '$version' AND ".
+                        ( ( $language )? "ezcontentobject_attribute.language_code = '$language'": eZContentLanguage::sqlFilter( 'ezcontentobject_attribute', 'ezcontentobject_version' ) ).
+                      " ORDER by
+                        ezcontentclass_attribute.placement ASC";
 
-            $attr->setContentClassAttributeIdentifier( $attribute['classattribute_identifier'] );
+            $attributeArray = $db->arrayQuery( $query );
 
-            $dataType = $attr->dataType();
+            $returnAttributeArray = array();
+            foreach ( $attributeArray as $attribute )
+            {
+                $attr = new eZContentObjectAttribute( $attribute );
 
-            if ( is_object( $dataType ) &&
-                 $dataType->Attributes["properties"]["translation_allowed"] &&
-                 $attribute['can_translate'] )
-                $attr->setContentClassAttributeCanTranslate( 1 );
-            else
-                $attr->setContentClassAttributeCanTranslate( 0 );
+                $attr->setContentClassAttributeIdentifier( $attribute['classattribute_identifier'] );
+
+                $dataType = $attr->dataType();
+
+                if ( is_object( $dataType ) &&
+                     $dataType->Attributes["properties"]["translation_allowed"] &&
+                     $attribute['can_translate'] )
+                    $attr->setContentClassAttributeCanTranslate( 1 );
+                else
+                    $attr->setContentClassAttributeCanTranslate( 0 );
 
-            $attr->setContentClassAttributeName( eZContentClassAttribute::nameFromSerializedString( $attribute['attribute_serialized_name_list'] ) );
+                $attr->setContentClassAttributeName( eZContentClassAttribute::nameFromSerializedString( $attribute['attribute_serialized_name_list'] ) );
 
-            $returnAttributeArray[] = $attr;
+                $returnAttributeArray[] = $attr;
+            }
+            $cache->store('ezcontentobject_attributes', $returnAttributeArray, $contentObjectID, $version, $language);
         }
         return $returnAttributeArray;
     }
Index: kernel/classes/ezcontentupload.php
===================================================================
--- kernel/classes/ezcontentupload.php	(revision 20548)
+++ kernel/classes/ezcontentupload.php	(working copy)
@@ -1198,8 +1198,8 @@
     {
         if ( is_numeric( $nodeName ) )
         {
-            $node = eZContentObjectTreeNode::fetch( $nodeName, false, false );
-            if ( is_array( $node ) )
+            $node = eZContentObjectTreeNode::fetch( $nodeName );
+            if ( $node )
             {
                 $result['status'] = eZContentUpload::STATUS_PERMISSION_DENIED;
                 $errors[] = array( 'description' => ezi18n( 'kernel/content/upload',
Index: kernel/classes/ezobjectcache.php
===================================================================
--- kernel/classes/ezobjectcache.php	(revision 0)
+++ kernel/classes/ezobjectcache.php	(revision 0)
@@ -0,0 +1,178 @@
+<?php
+//
+// Definition of eZObjectCacheManager class
+//
+// Created on: <27-Aug-2007 11:02:38 ar>
+//
+// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
+// SOFTWARE NAME: eZ publish
+// SOFTWARE RELEASE: 4.0.x
+// COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
+// SOFTWARE LICENSE: GNU General Public License v2.0
+// NOTICE: >
+//   This program is free software; you can redistribute it and/or
+//   modify it under the terms of version 2.0  of the GNU General
+//   Public License as published by the Free Software Foundation.
+//
+//   This program is distributed in the hope that it will be useful,
+//   but WITHOUT ANY WARRANTY; without even the implied warranty of
+//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//   GNU General Public License for more details.
+//
+//   You should have received a copy of version 2.0 of the GNU General
+//   Public License along with this program; if not, write to the Free
+//   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+//   MA 02110-1301, USA.
+//
+//
+// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
+//
+
+/*! \file ezobjectcachemanager.php
+*/
+
+/*!
+  \class eZObjectCacheManager ezobjectcachemanager.php
+  \brief Handles object cache
+
+  This class handles in memory object cache.
+  It will by default keep max 60 objects in memory at a
+  time to avoid to high memory usage.
+*/
+
+
+
+class eZObjectCache
+{
+    protected $selfCache = array();
+    protected $maxCache = 60;
+    protected static $instance = null;
+
+    protected function __construct()
+    {
+        // TODO: Load settings from ini !
+    }
+
+    protected function __clone()
+    {
+        // protected __clone, prevents cloning of object
+    }
+
+    /*
+     Static Singleton function to get a instance of this class
+     */
+    public static function getInstance()
+    {
+        if ( self::$instance === null )
+        {
+            self::$instance = new eZObjectCache();
+        }
+        return self::$instance;
+    }
+
+
+     /*!
+     returns cached data
+     */
+    public static function debug()
+    {
+        if ( self::$instance !== null )
+        {
+            $data = self::$instance->selfCache;
+            return $data;
+        }
+        return array();
+    }
+
+
+     /*!
+     disables parts of the self cache
+     */
+    public static function disable( $type = 'default' )
+    {
+        self::getInstance();
+        self::$instance->maxCache = 0;
+    }
+
+
+     /*!
+     gets the max number of objects to store in self Cache
+     */
+    public function max( $type = 'default' )
+    {
+        return $this->maxCache;
+    }
+
+
+    /*!
+     self cache clear function
+     */
+    public function clear( $type, $id = 'all', $version = 'undefined', $lang = 'undefined' )
+    {
+        if ( $type and $this->max( $type ) and isset( $this->selfCache[$type] ))
+        {
+            if ( $id === 'all' )
+            {
+                unset( $this->selfCache[$type] );
+            }
+            else
+            {
+                unset($this->selfCache[$type][$id.'_'.$version.'_'.$lang]);
+            }
+            return true;
+        }
+        return false;
+    }
+
+
+    /*!
+     self cache getter
+     */
+    public function fetch( $type, $id = 'all', $version = 'undefined', $lang = 'undefined' )
+    {
+        if ( $type and isset( $this->selfCache[$type][$id.'_'.$version.'_'.$lang] ))
+        {
+            return $this->selfCache[$type][$id.'_'.$version.'_'.$lang];
+        }
+        return null;
+    }
+
+
+    /*!
+     self cache setter
+     */
+    public function store( $type, $content, $id = 'all', $version = 'undefined', $lang = 'undefined', $max = null )
+    {
+        if ( $max === null )
+        {
+            $max = $this->max( $type ) ;
+        }
+
+        if ( !$type or !isset($content) or !$max )
+        {
+            return false;
+        }
+
+        $cache = array();
+
+        if ( isset( $this->selfCache[$type] ))
+        {
+            $cache = $this->selfCache[$type];
+        }
+
+        if ( count( $cache ) > $max )
+        {
+           // Remove 10% to avoid unsetting on each insert
+           foreach( array_slice( $cache, 0, 0.1 * $max, true ) as $key => $value )
+           {
+               unset( $cache[$key] );
+           }
+        }
+
+        $cache[$id.'_'.$version.'_'.$lang] = $content;
+        $this->selfCache[$type] = $cache;
+        return true;
+    }
+}
+
+?>
\ No newline at end of file
Index: kernel/classes/ezpolicylimitation.php
===================================================================
--- kernel/classes/ezpolicylimitation.php	(revision 20548)
+++ kernel/classes/ezpolicylimitation.php	(working copy)
@@ -278,11 +278,11 @@
             //include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
             foreach ( $valueList as $value )
             {
-                $node = eZContentObjectTreeNode::fetch( $value, false, false );
-                if ( $node == null )
+                $node = eZContentObjectTreeNode::fetch( $value );
+                if ( !$node )
                     continue;
                 $limitationValuePair = array();
-                $limitationValuePair['Name'] = $node['name'];
+                $limitationValuePair['Name'] = $node->attribute('name');
                 $limitationValuePair['value'] = $value;
                 $limitationValueArray[] = $limitationValuePair;
             }
Index: kernel/classes/ezrole.php
===================================================================
--- kernel/classes/ezrole.php	(revision 20548)
+++ kernel/classes/ezrole.php	(working copy)
@@ -700,11 +700,11 @@
             {
                 //include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
 
-                $node = eZContentObjectTreeNode::fetch( $limitValue, false, false );
+                $node = eZContentObjectTreeNode::fetch( $limitValue );
                 if ( $node )
                 {
                     $limitIdent = 'Subtree';
-                    $limitValue = $node['path_string'];
+                    $limitValue = $node->attribute('path_string');
                 }
                 else
                 {
Index: kernel/classes/ezsection.php
===================================================================
--- kernel/classes/ezsection.php	(revision 20548)
+++ kernel/classes/ezsection.php	(working copy)
@@ -82,11 +82,16 @@
     */
     static function fetch( $sectionID, $asObject = true )
     {
-        global $eZContentSectionObjectCache;
+        $section = null;
+        $cache = eZObjectCache::getInstance();
+        if ( $asObject )
+        {
+            $section = $cache->fetch('ezcontentsectionobject', $sectionID);
+        }
 
         // If the object given by its id is not cached or should be returned as array
         // then we fetch it from the DB (objects are always cached as arrays).
-        if ( !isset( $eZContentSectionObjectCache[$sectionID] ) or $asObject === false )
+        if ( $section === null )
         {
             $section = eZPersistentObject::fetchObject( eZSection::definition(),
                                                 null,
@@ -94,13 +99,9 @@
                                                 $asObject );
             if ( $asObject )
             {
-                $eZContentSectionObjectCache[$sectionID] = $section;
+                $cache->store('ezcontentsectionobject', $section, $sectionID);
             }
         }
-        else
-        {
-            $section = $eZContentSectionObjectCache[$sectionID];
-        }
         return $section;
     }
 
@@ -217,6 +218,8 @@
     */
     function removeThis( $conditions = null, $extraConditions = null )
     {
+        $cache = eZObjectCache::getInstance();
+        $cache->clear('ezcontentsectionobject', $this->ID);
         eZPersistentObject::remove( array( "id" => $this->ID ), $extraConditions );
     }
 
Index: kernel/classes/ezurlaliasml.php
===================================================================
--- kernel/classes/ezurlaliasml.php	(revision 20548)
+++ kernel/classes/ezurlaliasml.php	(working copy)
@@ -842,6 +842,14 @@
             eZDebug::writeError( "Action value array must not be empty" );
             return null;
         }
+
+        $cache = eZObjectCache::getInstance();
+        $path = $cache->fetch('ezurlaliasml', join('_', $actionValues) );
+        if ( $path !== null )
+        {
+            return join( "/", $path );
+        }
+
         $db = eZDB::instance();
         $actionList = array();
         foreach ( $actionValues as $i => $value )
@@ -869,7 +877,7 @@
             $action = $actionName . ":" . $actionValue;
             if ( !isset( $actionMap[$action] ) )
             {
-//                eZDebug::writeError( "The action '{$action}' was not found in the database for the current language language filter, cannot calculate path." );
+//                eZDebug::writeError( "The action '{$action}' was not found in the database for the current language filter, cannot calculate path." );
                 return null;
             }
             $actionRows = $actionMap[$action];
@@ -921,6 +929,7 @@
                 return null;
             }
         }
+        $cache->store('ezurlaliasml', $path, join('_', $actionValues) );
         return join( "/", $path );
     }
 
Index: kernel/role/edit.php
===================================================================
--- kernel/role/edit.php	(revision 20548)
+++ kernel/role/edit.php	(working copy)
@@ -354,8 +354,8 @@
 
             foreach ( $deletedIDList as $deletedID )
             {
-                $subtree = eZContentObjectTreeNode::fetch( $deletedID , false, false);
-                $path = $subtree['path_string'];
+                $subtree = eZContentObjectTreeNode::fetch( $deletedID );
+                $path = $subtree->attribute('path_string');
                 eZPolicyLimitationValue::removeByValue( $path, $http->sessionVariable( 'BrowsePolicyID' ) );
             }
         }
Index: kernel/role/policyedit.php
===================================================================
--- kernel/role/policyedit.php	(revision 20548)
+++ kernel/role/policyedit.php	(working copy)
@@ -128,8 +128,8 @@
         $db->begin();
         foreach ( $deletedIDList as $deletedID )
         {
-            $subtree = eZContentObjectTreeNode::fetch( $deletedID, false, false );
-            $path = $subtree['path_string'];
+            $subtree = eZContentObjectTreeNode::fetch( $deletedID );
+            $path = $subtree->attribute('path_string');
             eZPolicyLimitationValue::removeByValue( $path, $policyID );
         }
         $db->commit();
Index: kernel/shop/ezshopfunctioncollection.php
===================================================================
--- kernel/shop/ezshopfunctioncollection.php	(revision 20548)
+++ kernel/shop/ezshopfunctioncollection.php	(working copy)
@@ -91,11 +91,11 @@
     {
         //include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
 
-        $node = eZContentObjectTreeNode::fetch( $topParentNodeID , false, false);
-        if ( !is_array( $node ) )
+        $node = eZContentObjectTreeNode::fetch( $topParentNodeID );
+        if ( !$node )
             return array( 'result' => null );
 
-        $nodePath = $node['path_string'];
+        $nodePath = $node->attribute('path_string');
         $currentTime = time();
         $sqlCreatedCondition = '';
 
