Likewise, this function is similar to the $this->getUrl('mypage.html'); function, to access a specific page. The media files can also be easily accessed from CMS pages, using the function given below: You can also call a Magento static block from within a CMS page content area, using this function: ### Cache Caching is also an important part of Magento, like any other CMS. The model controlling the caching subsystem in Magento is Mage_Core_Model_Cache. To access the cache, we use it through an already instantiated object accessible at Mage::app()->getCache(). Here I'll enlist the cache functions used to save, load, and clear cache objects. To load a cache object, we use the getCache() function: After cache object loading, we use the following function to save an item in it. An example of such saving could be: In the above example, we save the string Save this string into cache. In order to access that in future, we give it a key (string_key), then we give it a tag (string_tag), and lastly, we give it lifetime of 1 hour (60*60 seconds). Once we are done saving the value in cache, we can now retrieve it by using the load(); function and passing on the string_key as a parameter: Similarly, we can remove that entry saved in cache by using the remove(); function, and passing on the string_key as a parameter: You may be wondering by now, of what use is the array we used for tagging. The purpose of such tagging is to perform a function on mass scale, by referring to all the cache entries which have a particular tag assigned to them. For instance, if we use the following code, it'll delete all the entries in the cache that have the string_tag array assigned to them. ### Session Since we've explained cache functions, I guess mentioning sessions becomes mandatory. In Magento, session variables can be as easily saved, loaded and removed as cache variables. I'll try to explain that with two examples. Now we have saved into cache $msgOne as ValueOne and \$msgTwo as ValueTwo. In order to retrieve these two, we'll use these functions:

Here I have deliberately saved and loaded two variables into session, so that you can understand how the set, get, and unset prefixes work.

Just like saving and loading, the removal process is fairly similar for session variables:

Lastly, you can use this handy function to check whether a customer is logged in or not:

Well, as I said earlier, Magento is a huge CMS, and its functions cannot be piled up in a single post. But I've tried my best to compile a list of the most frequently used functions, and I've also tried to briefly explain how they work and what parameters they expect. A careful analysis of these functions will also give you some understanding of how Magento functions work. As a parting thought, I would encourage you to explore the XML and PHTML files of the Magento base theme, to learn more about Magento functions.