Understanding Magento Registry

The registry stores data to memory which is specific to that request (rather than user or anything else), and persists for the duration of that request only. The principle is very simple really, the Mage class is instantiated as a singleton object for every request and the instantiated Mage object remains in memory, and is accessible in all classes (and templates) until the request completes and the response is sent.

As the object is a singleton, whenever you access it you get the same object. All that is happening is that you are storing values to this object, so when one class stores a value, and another accesses it they are both working on the same object and the second class is able to retrieve the value the first class set.


The registry is stored in memory and is per HTTP request, so you are not able to share data between different requests or users.


Magento Registry stored in the application’s memory.

when ever your script is done running, whatever you had stored in the registry is gone, so there is no need to worry about clearing it out (unless the script you are running is storing large objects in the registry and is looping through a lot of data).

In such case, you have to unregister your entries when you are done with them.

the Registry is just a static property of the Mage class. see for details

but still I couldn’t really find out a good explanation

2) for each users there will be separate registry per request on server.

hope this will make little clear in your mind