Explain the difference between Mage::getSingleton() and Mage::getModel() in Magento?

S.no Mage::getSingleton() Mage::getModel()
1. It will first check the same class instance is exists or not in memory. If the instance is created then Mage::getSingleton() will return the same object from memory. The Mage::getModel() will create a new instance of an object every time even such purposes exists in configuration.

Suggest An Answer

No suggestions avaliable!

Latest post from Magento Interview Questions

Ask Question