How to work/flow Enterprise_PageCache_Model_Container_Abstract class in Magento? (Magento EE 1.13.0.2)

Object: $this => Enterprise_PageCache_Model_Container_Abstract

Following constants is used in above class: No constants

Following variables is used in above class:

  • $_processor
  • $_placeholder
  • $_placeholderBlock

Some important functions and its purpose used in this class:

  • applyWithoutApp(): This function is used for generate placeholder content before application was initialized and apply to page content if possible.
  • applyInApp(): This function is used for generate and apply container content in controller after application is initialized.
  • saveCache(): This function is used for save rendered block content to cache storage.
  • _applyToContent(): This function is used for replace container placeholder in content on container content.
  • _saveCache(): This function is used for save data to cache storage.

Functions in class Enterprise_PageCache_Model_Container_Abstract

  • **Class constructor @param Enterprise_PageCache_Model_Container_Placeholder $placeholder **/ public function __construct($placeholder){}
  • /**Get container individual cache id * @return string|false **/ protected function _getCacheId(){}
  • /**Generate placeholder content before application was initialized and apply to page content if possible * @param string $content * @return bool*/ public function applyWithoutApp(&$content){}
  • /**Generate and apply container content in controller after application is initialized *@param string $content*@return bool **/ public function applyInApp(&$content) {}
  • /**Save rendered block content to cache storage * @param string $blockContent* @param array $tags * @return Enterprise_PageCache_Model_Container_Abstract **/ public function saveCache($blockContent, $tags = array()){}
  • /**Render block content from placeholder * @return string|false**/ protected function _renderBlock(){}
  • /** Replace container placeholder in content on container content * @param string $content * @param string $containerContent**/ protected function _applyToContent(&$content, $containerContent){}
  • /**Load cached data by cache id *@param string $id *@return string|false **/ protected function _loadCache($id){}
  • /**Save data to cache storage *@param string $data * @param string $id * @param array $tags * @param null|int $lifetime * @return Enterprise_PageCache_Model_Container_Abstract **/ protected function _saveCache($data, $id, $tags = array(), $lifetime = null){}
  • /** Retrieve cookie value * @param string $cookieName * @param mixed $defaultValue * @return string**/ protected function _getCookieValue($cookieName, $defaultValue = null){}
  • /**Set processor for container needs * @param Enterprise_PageCache_Model_Processor $processor * @return Enterprise_PageCache_Model_Container_Abstract*/ public function setProcessor(Enterprise_PageCache_Model_Processor $processor){}
  • /**Get last visited category id * @return string null**/ protected function _getCategoryId(){}
  • /**Get current product id * @return string null**/ protected function _getProductId(){}
  • /** Get current request id * @return string null **/ protected function _getRequestId() { return !$this->_processor ? null : $this->_processor->getRequestId(); }
  • /**Get Placeholder Block * @return Mage_Core_Block_Abstract **/ protected function _getPlaceHolderBlock() {}
  • /**Set placeholder block * @param Mage_Core_Block_Abstract $block * @return Enterprise_PageCache_Model_Container_Abstract **/ public function setPlaceholderBlock(Mage_Core_Block_Abstract $block){}

Variation of sample data for different pages (Homepage, Product Listing Page, Product Info Page)
Variables: These values for Homepage
URL: http://localhost/oscp-store/mage-ent-test

  • $_processor = Enterprise_PageCache_Model_Processor
       $_requestId = localhost/mayuri/P_14/offline/mage-ent-test/
                    _4f6cd225551b5d16f072e0ce5c483c03_cb38d4e3e50884d22963651082f514d8	
       $_requestCacheId = REQEST_7a18cdc0241c4d0ae04bfdf7051ff384	
       $_requestTags = Array [1]	
    		 0 = FPC
       $_metaData = < Uninitialized >	
       $_designExceptionExistsInCache = 1404558971	
       $_requestProcessor = Enterprise_PageCache_Model_Processor_Default	
       $_placeholder = <Uninitialized>	
       $_noCacheGetParams = Array [2]	
       $_allowCache = true	
       $_subprocessor = <Uninitialized>
  • $_placeholder = Enterprise_PageCache_Model_Container_Placeholder
       $_definitionMap = Array [0]	
       $_definition = WELCOME 
                               container = "Enterprise_PageCache_Model_Container_Welcome" 
                               block = "Mage_Page_Block_Html_Welcome" 
                               cache_id = "bf3668918d4f26657cdbfe6550c62f39a86211ba" 
                               cache_lifetime = "86400" 
                               template=""	
    
       $_name = WELCOME
    
       $_attributes = Array [5]		
                             container = Enterprise_PageCache_Model_Container_Welcome	
                             block = Mage_Page_Block_Html_Welcome	
                             cache_id = bf3668918d4f26657cdbfe6550c62f39a86211ba	
                             cache_lifetime = 86400	
                             template = 	
     
  • $_placeholderBlock = Mage_Page_Block_Html_Welcome

Variables: These values for product listing page
URL: http://localhost/oscp-store/mage-ent-test/furniture/living-room

  • $_processor = Enterprise_PageCache_Model_Processor	
       $_requestId=localhost/mayuri/P_14/offline/mage-ent-test/furniture/
                 living-room_eae470124b29599b71eddb586e5eaaab_03ef1da55eadbe7c9111d3f77d89c3bb	
       $_requestCacheId = REQEST_e67a7b9832c75a9366ff4c5adabb957c	
       $_requestTags = Array [1]
    	            0 = FPC
       $_metaData = <Uninitialized>	
       $_designExceptionExistsInCache = 1404562240	
       $_requestProcessor = Enterprise_PageCache_Model_Processor_Category	
       $_subprocessor = <Uninitialized >
    
  • $_placeholder = Enterprise_PageCache_Model_Container_Placeholder	
       $_definitionMap = Array [1]
                          WELCOME container="Enterprise_PageCache_Model_Container_Welcome" 
    	           block = "Mage_Page_Block_Html_Welcome" 
    	           cache_id = "bf3668918d4f26657cdbfe6550c62f39a86211ba" 
    	           cache_lifetime = "86400" 
    	           template = ""
    $_definition = ACCLINKS 
                              container = "Enterprise_PageCache_Model_Container_Accountlinks" 
                              block = "Mage_Page_Block_Template_Links"   
                             cache_id = "1a1ae16bde0165351bb8a20738608e21235d71b2" 
                             cache_lifetime = "86400" 
                             template = "page/template/links.phtml" 
                             links=  garbage value
                             name = "account.links"
    
      $_name = ACCLINKS	
    
    $_attributes = Array [7]	
                            container = Enterprise_PageCache_Model_Container_Accountlinks
                            block = Mage_Page_Block_Template_Links	
                            cache_id = 1a1ae16bde0165351bb8a20738608e21235d71b2
                            cache_lifetime = 86400	
                            template = page/template/links.phtml
                            links = garbage value	
                            name = account.links	
    
  • $_placeholderBlock = Mage_Page_Block_Template_Links

Variables: These values for product Info page
URL: http://localhost/oscp-store/mage-ent-test/furniture/living-room/couch.html

  • $_processor = Enterprise_PageCache_Model_Processor	
       $_requestId =localhost/mayuri/P_14/offline/mage-ent-test/furniture/living-room/
    	   couch.html_eae470124b29599b71eddb586e5eaaab_03ef1da55eadbe7c9111d3f77d89c3bb	
       $_requestCacheId = REQEST_494440fa90c3eadeb3527250c4fa65c6	
       $_requestTags = Array [1]
    		      0 = FPC
       $_metaData = <Uninitialized>	
       $_designExceptionExistsInCache = 1404562240	
       $_requestProcessor = Enterprise_PageCache_Model_Processor_Product	
       $_subprocessor = < Uninitialized >	
    
  • $_placeholder =	Enterprise_PageCache_Model_Container_Placeholder	
       $_definitionMap = Array [0]	
       $_definition = WELCOME  
                                container = "Enterprise_PageCache_Model_Container_Welcome" 
                                block = "Mage_Page_Block_Html_Welcome" 
    		    cache_id = "bf3668918d4f26657cdbfe6550c62f39a86211ba" 
                                cache_lifetime = "86400" 
    	                template = ""	
    
       $_name = WELCOME
    
       $_attributes = Array [5]	
                             container = Enterprise_PageCache_Model_Container_Welcome	
                             block = Mage_Page_Block_Html_Welcome	
                             cache_id = bf3668918d4f26657cdbfe6550c62f39a86211ba	
                             cache_lifetime = 86400	
    	              template
    
  • $_placeholderBlock = Mage_Page_Block_Html_Welcome