Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Import and cleanCache
 
lbourrel
Jr. Member
 
Avatar
Total Posts:  26
Joined:  2008-06-09
Ayaline - Poitiers
 

Hi everybody,

I’m working on an import module using the magento model (not the Dataflow) and i have a problem with performance....
Yeah i know, it’s a usual suspect in Magento forum… But what i can’t understand is that it seems to come from the cleanCache() function in beforeSave() and afterSave() of my product model.

I’m doing (for the moment) something very simple :

$product Mage::getModel 'catalog/product' );
            
$row = array (
                    
'sku' => $ean
                    
'store' => 0
                    
'attribute_set' => "Default"
                    
'type' => 'Simple Product'
                    
'name' => trim $name ), 
                    
'description' => 'N/A'
                    
'price' => trim $price ), 
                    
'short_description' => 'N/A'
                    
'weight' => trim $weight ), 
                    
'status' => 'Enabled'
                    
'tax_class_id' => 'Taxable Goods' );
            
$line = array (
                    
'i' => 1
                    
'row' => $row );
            
$product->importFromTextArray $line );
            
$product->save();

Does anyone has an explaination about this ? Is there a way to bypass the cache ? I would not want to override the Product Model and delete these functions, cause there would be some impacts for the whole application.

Thanks,
Laurent

 
Magento Community Magento Community
Magento Community
Magento Community
 
uni-man
Member
 
Total Posts:  34
Joined:  2008-04-04
 

Hi Laurent. See this post: http://www.magentocommerce.com/boards/viewthread/4694/P15/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top